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]

Re: gdb and threads


On Thu, 12 Apr 2012 11:44:26 +0200, Folkert van Heusden wrote:
> Now when my program gets a SIGSEGV, I can use 'bt' in gdb to get a backtrace.
> Can I be sure that the backtrace I get is the one from the thread
> causing the SIGSEGV?

Assuming GDB default mode, not async/non-stop modes.

With live process yes.  But be aware multiple threads may segfault "at once".

With core files it depends which thread is put first in the core file, with
Linux kernel in practice it works, I do not know guarantees of it in Linux
kernel.


Regards,
Jan


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