[committed][gdb/testsuite] Add gdb.base/eh_return.exp

Luis Machado luis.machado@linaro.org
Wed Aug 26 17:20:08 GMT 2020


On 8/16/20 8:31 AM, Tom de Vries wrote:
> Hi,
> 
> In PR25350, an internal error was reported:
> ...
> (gdb) break *eh2+0x7e
> Breakpoint 1 at 0x13e2: file small.c, line 38.
> (gdb) run
> Starting program: a.out
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/usr/lib/libthread_db.so.1".
> 
> Breakpoint 1, 0x00005555555553e2 in eh2 (
> frame.c:558: internal-error: frame_id get_frame_id(frame_info*): \
>    Assertion `stashed' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> ...
> 
> The internal error does not reproduce after recent commit 547ce8f00b
> "[gdb/backtrace] Fix printing of fortran string args".
> 
> Add the corresponding test-case as regression test, given that the code is
> rather atypical.
> 
> Tested on x86_64-linux.

This doesn't work so well on aarch64-linux because the breakpoint 
location from before running the program doesn't exists after running 
it. Things get relocated.

--

(gdb) break *0x000000000000099c^M
Breakpoint 1 at 0x99c: file 
/home/luis.machado/work/tcwg/build/binutils-gdb-master/gdb/testsuite/../../../../repos/binutils-gdb/gdb/testsuite/gdb.base/eh_return.c, 
line 54.^M
(gdb) PASS: gdb.base/eh_return.exp: setting breakpoint at 
*0x000000000000099c
run ^M
Starting program: 
/home/luis.machado/work/tcwg/build/binutils-gdb-master/gdb/testsuite/outputs/gdb.base/eh_return/eh_return 
^M
Warning:^M
Cannot insert breakpoint 1.^M
Cannot access memory at address 0x99c^M
^M
(gdb) FAIL: gdb.base/eh_return.exp: hit breakpoint

--

Shouldn't we insert a breakpoint after the relocation has happened? Or 
add the breakpoint to a symbolic reference?


More information about the Gdb-patches mailing list