Archive for April, 2010

GDB Tricks: stack trace on a SIGSEGV

April 22, 2010

One thing I commonly use GDB for is getting a stack trace after a program I am working on sigfaults

I added this to my .bashrc

gcatch(){
  gdb -ex 'r' -ex 'back' -ex 'q' --args $*
}

So if my program segfaults I can press up and prepend gcatch to the command and voila! Stack trace.

The name gcatch comes from the frysk command line utility fcatch which performs the same job.

C++ Support in GDB: What is Next ?

April 1, 2010

cgdb.png

So it has been quite a while since I last blogged. I have been hacking away on GDB’s C++ expression evaluation. As my current task is winding down I am planning to do some research to find out more shortcomings of gdb when it comes to debugging C++. One of laziest and perhaps best ways of doing so is to ask you, the user, about what could be improved in gdb to help you debug your C++ application.

So!
<infomercial>
– Are you a C++ developer ?
– Are you tired of fiddle around with debuggers that just don’t work ?
<black and white footage of a dude debugging. He throws his fists in frustrated surrender>
– Well worry no more! post a comment on this blog or send an email to archer@sourceware.org
and let us know how we can improve you experience.
<coloured footage of a girl typing an email with an unnaturally big smile on her face>
</infomercial>

Sami


Follow

Get every new post delivered to your Inbox.