Hacker News new | ask | show | jobs
by wazari972 3633 days ago
>> let's me inspect common data types without jumping through hoops?

could you elaborate on what's missing in GDB? data-types are written in the binary by the compiler (dwarf format), and GDB does nothing more / nothing less than parsing it and giving access to it through it user interface.

GDB has no knowledge about your code or it's library in itself (at least in C, Python extentions now include libc++ data-type-specific pretty-printers)

1 comments

That is exactly what is missing in GDB. The most common things you do while debugging are treated as exotic special cases. Every other debugger I've ever used tries to show me the environment I've landed in, giving me context I can use to understand program state. That is, so far as I'm concerned, the first and most important job a debugger is supposed to do. GDB shows me nothing; I have to tug every scrap of knowledge out of it individually, and I have to tell it how this work should be done. Instead of feeling like I'm using a tool that helps me and does some of the work for me, enhancing my awareness, it feels like I'm fighting with a tool that wants to make my life difficult, that is grudgingly giving up scraps of jealously-guarded information only when I can prove my worth by guessing and reciting its arcane incantations.

I rarely bother; it's easier to fprintf() and read the log file, and this has the advantage of also working when you're trying to debug asynchronous processes.