This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Time to expand "Program received signal" ?
> Date: Thu, 15 Nov 2012 10:36:26 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: Mark Kettenis <mark.kettenis@xs4all.nl>, brobecker@adacore.com, gdb@sourceware.org
>
> > GDB shouldn't mention
> > threads at all, unless the program being debugged has more than a
> > single thread.
>
> See? If it has a single thread, GDB calls that thread "thread 1".
To propose a compromise: can we call the only thread "main thread"
instead of "thread 1"?
> GDB's model calls the unit of scheduling in the inferior that got
> the signal "Thread N". You can "thread N" to switch to it.
>
> (gdb) maint print target-stack
> The current target stack is:
> - child (Unix child process)
> - exec (Local exec file)
> - None (None)
> (gdb) info threads
> Id Target Id Frame
> * 1 process 9939 "break" main (argc=1, argv=0x7fffffffdc48, envp=0x7fffffffdc58) at ../../../src/gdb/testsuite/gdb.base/break.c:89
This just says that GDB's model is self-consistent. Being consistent
doesn't necessarily mean being correct ;-)