GDB tools for intel debugging
Posted by: Kevin Ballard in Miscellaneous, Programming, tags: debugging, gdb, intel, macsb, ProgrammingI 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.
Entries (RSS)
February 23rd, 2006 at 11:30 pm
What’s the character encoding on that—I’m seeing some “gremlins” when viewing it …
February 23rd, 2006 at 11:39 pm
The encoding seems to be UTF-8 from this end, no problems here. If you’re getting weird individual characters (i.e. a strange block in the middle of a word), then it’s generally non-unicode being misinterpreted as unicode. If you see pairs of high-ascii instead of letters, then it’s generally the opposite.
February 24th, 2006 at 12:19 am
Oh oops, I forgot I had some non-breaking spaces in there (otherwise gdb ignores the blank lines in the doc strings). It’s UTF-8. I’ll fix the file to be ASCII-only instead. Sorry ‘bout that.
February 26th, 2006 at 6:52 am
Nice stuff, Kevin. You’re paving the way for a smooth transition to Intel debugging!
PS I like this blog’s template, too. The big sectional labels make it really easy to navigate. Blog envy!