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.
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)