Posts Tagged “gdb”

I just spent some time and put together a bunch of user-defined commands to aid debugging with gdb on intel machines. They allow you to do things like print arguments to the current method, print arguments for the method about to be called, print return values, etc. To try them out, download this file, put it in your home folder, and rename it to .gdbinit. Then the next time you run gdb, try running help user-defined to get a synopsis of all new commands. You can ask for help on a specific command for more details as well.

The basis for this was inspired by Daniel Jalkut on the #macsb channel.

Update: I just added a new function getret. Re-download to get the changes.

Comments Comments Off