This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
generated code.

Thanks,
Jay.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]