Currently "help user-defined" lists commands defined in Misc/gdbinit without explanations (gdb) help user-defined User-defined commands. The commands in this class are those defined by the user. Use the "define" command to define a command. List of commands: lineno -- User-defined printframe -- User-defined pu -- User-defined pyframe -- User-defined pyframev -- User-defined pyg -- User-defined With attached patch, you get List of commands: lineno -- User-defined printframe -- User-defined pu -- Generally useful macro to print a Unicode string pyframe -- User-defined pyframev -- Print the current frame - verbose pyg -- Prints a representation of the object to stderr pylocals -- Print the local variables of the current frame pyo -- Prints a representation of the object to stderr pystack -- Print the entire Python call stack pystackv -- Print the entire Python call stack - verbose mode This should be further polished, but I wanted to hear from others before spending more effort.
This looks like a good idea. Of course, since we now have the python-gdb pluging which provides much more powerful diagnostics on modern gdbs, the usefulness of gdbinit is a bit reduced.
This looks good to me. I added a pull request with a couple minor tweaks. Unfortunately, I can't tell how to add a "skip news" label. This doesn't seem "big" enough to warrant it.