23 comments

[ 5.2 ms ] story [ 62.5 ms ] thread
Cool. Visual Studio 2010 was supposed to do that also, I'm glad to hear GDB already has it.
This is available now, in the just released gdb-7.0. Debug any native Linux process in reverse, on x86 and x86_64 architectures. Reverse-continue, reverse-step, reverse-next, and so on. It's pretty fast, too!
The major new features are:

  * Python scripting support
  * Reverse debugging, Process record and replay
  * Non-stop debugging
  * Multi-architecture debugging
  * Multi-inferior, multi-process debugging
  
It also features many enhancements and bug fixes, including:

  * GDB now has an interface for JIT compilation
  * Tracepoints may now be conditional
  * Multi-byte and wide character set support
  * New /r and /m modifiers for the "disassemble" command
  * Automatic retrieval of shared library files from remote targets
  * Inlined functions are now supported
  * New remote protocal packets
  * GDB is now able to read compressed debug sections
  * Thread switching is now supported on Tru64
  * Ada task switching is now supported
  * New features in gdbserver, the GDB remote stub
  * New command to stop execution when a system call is made
I'd be really interested to know a bit more about some of these. Anybody know what "non-stop" or "multi-inferior" debugging are? And what sort of benefit is gained from using multi-process debugging rather than having a separate gdb attached to each process?

Anyway, sounds like an awesomely good release.

"non-stop" means that some or all of the threads in the process may be running while gdb is prompting the user for the next command. So for instance you may have one thread stop at a breakpoint, but the rest keep running.

"Multi-inferior" means you can be debugging several different processes at once. I didn't work on this one personally so I can't say much about the benefits. But the work was paid for by a contractee, so obviously somebody thinks it is better. ;-0

Love GDB. It has saved my life many times, but who uses it anymore? Not trolling, just curious. Managed code has won, has it not?
There's plenty of C/C++ work. A lot of legacy but a good chunk of new stuff too.
Webapps and x86 have "won" too, but if you think nobody writes code for anything else you're awfully sheltered.
No, not yet. C and C++ are not only alive, but thriving.
I used it last night :)
as other posters on this thread have mentioned, i think it really depends on the community you belong to ... many GNU open-source hackers swear by C and won't touch managed code with a ten-foot-long stick because of their associations with Sun (Java) and MSFT (.NET) ... whereas if you're writing enterprise applications in a big company, your entire firm is probably on .NET and would scoff at those unix hippies still using command-line gdb :) joelonsoftware has an article entitled Biculturalism that addresses this issue:

http://www.joelonsoftware.com/articles/Biculturalism.html

GDB integrate very well with recent Emacs.(tooltip, visual breakpoint, stactrace etc)
truss and strace are also good debugging tools where GDB is not applicable for e.g. to debug sockets based client-server system
The gdb "attach" command is handy for those too.
Its a shame that the c++ pretty printers are packaged with libstdc++ (ie with gcc sources) not with gdb.