This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/11557] New: Stale register and frame info in non-stop/async modes, just after resuming a thread
- From: "pedro at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 29 Apr 2010 14:34:29 -0000
- Subject: [Bug gdb/11557] New: Stale register and frame info in non-stop/async modes, just after resuming a thread
- Reply-to: sourceware-bugzilla at sourceware dot org
In non-stop/async modes, just after a thread is resumed GDB still
shows the thread's register state as if it was still stopped were it
was before you resumed it. The bug is present in 7.0, 7.1, and
mainline. Vis, with GDB 7.0:
$gdb-7.0 -q -ex "set target-async 1" -ex "set non-stop 1" -ex "set pagination
off" stale-regcache
Reading symbols from stale-regcache...done.
(gdb) start
Temporary breakpoint 1 at 0x400563: file ns-stale-regcache.c, line 24.
Starting program: stale-regcache
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe0b8) at stale-regcache.c:24
24 volatile int my_number = 1;
(gdb) p $pc
$1 = (void (*)()) 0x400563 <main+15>
This is where it gets interesting:
(gdb) c&
Continuing.
(gdb) info threads
* 1 process 11017 (running)
(gdb) p $pc
$2 = (void (*)()) 0x400563 <main+15>
(gdb) frame
# 0 main (argc=Cannot access memory at address 0x7fffffffdfbc) at
stale-regcache.c:24
24 volatile int my_number = 1;
That PC and frame is of course, stale and bogus. Notice how we failed
to read ARGC (because the thread is actually running).
--
Summary: Stale register and frame info in non-stop/async modes,
just after resuming a thread
Product: gdb
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned at sourceware dot org
ReportedBy: pedro at codesourcery dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11557
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.