Search⌘ K

FAQs

Understand key frequently asked questions to enhance your Linux core dump analysis skills. Learn about GDB backtrace behavior, scripting support, core dump limitations, stack usage, thread signals, and tool compatibility. This lesson equips you to troubleshoot common core dump scenarios effectively.

Why do backtraces of some threads start from main() throughout the course?

If you are accustomed to the WinDbg debugger, then this is a completely justified question. The simple answer to the question is that of course, they do not start there, but by default, a stack trace is shown starting from the main function in GDB. We can change this behavior by using the set backtrace past-main command.

Is it possible to use scripts in GDB?

Yes, for example, in the past we wrote the following script to emulate the WinDbg dpp command in a file UserCommands.txt:

define dpp
  set $i = 0
  set $p = $arg0
  while $i < $arg1
    printf "%p: ", $p
    x/ga *(long *)$p
    set $i = $i + 1
    set $p = $p + 8
  end
end

We load the file in GDB and execute the ...