Bug 9786 - "info frame: generates an error when remote debugging
Summary: "info frame: generates an error when remote debugging
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: backtrace (show other bugs)
Version: 6.8
: P2 normal
Target Milestone: 6.8
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-25 01:09 UTC by Nick Roberts
Modified: 2009-10-14 00:44 UTC (History)
2 users (show)

See Also:
Host: i486-linux-gnu
Target: i486-linux-gnu
Build: i486-linux-gnu
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Roberts 2009-01-25 01:09:11 UTC
This report is actually for GDB in CVS (6.8.50.20090123-cvs) but that's not
one of the listed options.

In one terminal:
gdbserver localhost:4444 myprog

In another:
gdb myprog
...
(gdb) target remote localhost:4444
Remote debugging using localhost:4444
0xb7fda810 in ?? () from /lib/ld-linux.so.2
(gdb) info frame
Stack level 0, frame at 0x0:
 eip = 0xb7fda810; saved eip 
findvar.c:299: internal-error: value_of_register_lazy: Assertion `frame_id_p
(get_frame_id (frame))' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

Previously (GNU gdb 6.6-debian):

(gdb) target remote localhost:4444
Remote debugging using localhost:4444
0xb7f3f810 in ?? () from /lib/ld-linux.so.2
(gdb) inf frame
Stack level 0, frame at 0x0:
 eip = 0xb7f3f810; saved eip 0xb7f3f810
 Outermost frame: unwinder did not report frame ID
 Arglist at unknown address.
 Locals at unknown address, Previous frame's sp in esp

The saved eip was reported as the same as the actual eip.  I'm not sure
if that's right but in any case "info frame" shouldn't throw an error but
report "unknown address" if that's the case.
Comment 1 Joel Brobecker 2009-09-03 22:58:03 UTC
The following patch, sent as an RFC, fixes this issue:

http://www.sourceware.org/ml/gdb-patches/2009-08/msg00524.html
Comment 2 Nick Roberts 2009-09-04 23:34:35 UTC
Subject:  "info frame: generates an error when remote debugging

 > The following patch, sent as an RFC, fixes this issue:
 > 
 > http://www.sourceware.org/ml/gdb-patches/2009-08/msg00524.html

I can't comment on the broader implication of this patch but I can confirm
that it does, indeed, fix the bug that I reported.

Thanks,
Nick
Comment 3 Joel Brobecker 2009-09-10 02:30:00 UTC
To reproduce the problem without gdbserver, try the following on x86-linux:

(gdb) b _start
Breakpoint 1 at 0x80482a0
(gdb) run
Starting program: /lot.a/brobecke/info-frame/ex/foo 

Breakpoint 1, 0x080482a0 in _start ()
(gdb) info frame
Stack level 0, frame at 0x0:
 eip = 0x80482a0 in _start; saved eip 
/homes/brobecke/act/gdb-public/gdb/findvar.c:304: internal-error: value_of_regis
ter_lazy: Assertion `frame_id_p (get_frame_id (frame))' failed.
Comment 4 Tom Tromey 2009-10-13 16:47:34 UTC
This patch went in, so I'm guessing this bug should be closed... ?
Comment 5 Nick Roberts 2009-10-14 00:44:27 UTC
> This patch went in, so I'm guessing this bug should be closed... ?

Yes.