This is the mail archive of the
mailing list for the GDB project.
stopping backtrace at noreturn function
- From: "Jay Foad" <jay dot foad at gmail dot com>
- To: gdb at sourceware dot org
- Date: Thu, 13 Nov 2008 10:49:40 +0000
- Subject: stopping backtrace at noreturn function
Can gdb terminate a backtrace cleanly when it reaches a point where
there's really no way to find the pc of the previous frame, e.g. when
you get to an attribute((noreturn)) function that hasn't bothered to
save the return address on the stack?
I can see code in gdb/frame.c that terminates a backtrace when it
reaches main(), or when it reaches the entry point of the object file,
but I can't immediately see any way for e.g. gdbarch_unwind_pc to say
"sorry, no pc available".
I ask because I'm working on a JIT compiler that generates DWARF debug
info, and I'd like to be able to get this behaviour when debugging the