Bug 17700 - failed assertion in findvar.c -- frame_id_p ( get_frame_id (frame) )
Summary: failed assertion in findvar.c -- frame_id_p ( get_frame_id (frame) )
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: 7.8
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-11 19:47 UTC by Eric
Modified: 2021-10-28 17:26 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
ARM binary executable, tinyhttpd web server (6.36 KB, application/x-executable)
2014-12-11 19:47 UTC, Eric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric 2014-12-11 19:47:51 UTC
Created attachment 8005 [details]
ARM binary executable, tinyhttpd web server

The following text is printed by GDB when executing stepi in a while loop using a gdb script.

    0xf67e3020 in ?? ()
    1: x/i $pc
    findvar.c:292: 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) [answered Y; input not from terminal]

    This is a bug, please report it.  For instructions, see:
    <http://www.gnu.org/software/gdb/bugs/>.

    findvar.c:292: 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.
    Create a core file of GDB? (y or n) [answered Y; input not from terminal]

The setup is an ARM binary run using qemu-arm-static user emulation.

    qemu-arm-static -g 1234 ./httpd 8888

The -g option to qemu starts a gdb stub which is first connected to, before setting a breakpoint, continuing, and then executing a long series of stepi instructions before the bug is exercised.  I'll attach the binary in case it is of any use.  Note: if you try to run this and get as far as actually running the executable, you'll have to actually submit a request to the server (e.g., with curl) to exercise the bug.
Comment 1 Christophe Leroy 2021-10-28 17:26:05 UTC
Same problem observed with GCC 7.8.1 on powerpc/32:

Breakpoint 3, 0x00000300 in ?? ()
=> 0x00000300:	7d 50 43 a6	mtsprg  0,r10
(gdb) stepi
0x00000304 in ?? ()
=> 0x00000304:	7d 71 43 a6	mtsprg  1,r11
(gdb) print $r10
findvar.c:292: 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)