This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug threads/21117] New: Occasional wrong thread numbering when following an exec
- From: "simon.marchi at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 08 Feb 2017 22:55:50 +0000
- Subject: [Bug threads/21117] New: Occasional wrong thread numbering when following an exec
- Auto-submitted: auto-generated
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.