[Bug threads/21117] New: Occasional wrong thread numbering when following an exec
simon.marchi at ericsson dot com
sourceware-bugzilla@sourceware.org
Wed Feb 8 22:55:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=21117
Bug ID: 21117
Summary: Occasional wrong thread numbering when following an
exec
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: threads
Assignee: unassigned at sourceware dot org
Reporter: simon.marchi at ericsson dot com
Target Milestone: ---
I was playing with the mi-nsthrexec test, and noticed something odd.
I am using the test executable like this:
$ ./gdb -nx testsuite/outputs/gdb.mi/mi-nsthrexec/mi-nsthrexec -ex "b main"
-ex "r"
and I just use the "continue" command over and over. The spawned thread calls
exec, so each time we just come back to main. Post-exec, we expect to always
see thread 1 hitting the breakpoint at main. That's what happens most of the
time, but not always. Here's the result:
http://pastebin.com/raw/tQYnBfEV
As you can see, it goes from "Thread 1" to "Thread 12" to "Thread 49", etc.
AFAIK, when any thread of a process execs, it's the main thread (the one for
which tgid==pid in Linux terminology, pid==lwp in GDB terminology) that
survives, so we should always preserve Thread 1.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list