21 Aug 2003 BenFrantzDale   » (Journeyer)

I've been doing a lot of debuging at work using GDB. There are a bunch of useful commands among GDB's huge command list. Here's a quick list of the one's I've found useful:


  • make – run make. It can take arguments just like on the command line.
  • enter – do the same command again.
  • n (next) – move to the next source line in the file.
  • s (step) – step into the function.
  • finish – step out of the current function.
  • break filename:line number – set a breakpoint at a particular line.
  • clear – clear the breakpoint you are stopped on.
  • bt (backtrace) – show the current stack.
  • frame n – go to the nth stack frame.
  • info threads – list the current threads.
  • thread n – look at the nth thread.
  • print something – print a variable's value, or evaluate something (such as print sizeof(foo)
  • info locals – print all local variables.
  • info args – print all of the arguments to the current function as they are now (as opposed to as they were at the top of the function).
  • call function – call a function.
  • whatis something – print the type of a thing.
  • x – just look at help x. This does memory dumps in many formats.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!