diff options
author | Tom de Vries <tdevries@suse.de> | 2025-07-18 19:51:46 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-07-18 19:51:46 +0200 |
commit | cfbf9925c1c34f9e9d47c8b29d165866557663e3 (patch) | |
tree | e59970656b0480e98b04d8711681f75b83002261 /gdb/cli/cli-setshow.c | |
parent | f10173a01ffccbad7759ca24336355a87b0948aa (diff) | |
download | fsf-binutils-gdb-master.zip fsf-binutils-gdb-master.tar.gz fsf-binutils-gdb-master.tar.bz2 |
On x86_64-freebsd, with test-case gdb.arch/amd64-disp-step-self-call.exp, I
run into:
...
(gdb) continue
Continuing.
Program received signal SIGBUS, Bus error.
Object-specific hardware error.
0x000000080051492c in alarm () from /lib/libc.so.7
(gdb) FAIL: $exp: continue to breakpoint: test_call
...
The behaviour is not specific to gdb, it can be reproduced by running the
test-case executable:
...
$ ./outputs/gdb.arch/amd64-disp-step-self-call/amd64-disp-step-self-call
Bus error (core dumped)
$
...
The bus error happens when executing this instruction in alarm:
...
0000000000093910 <alarm>:
...
9392c: 0f 29 45 d0 movaps %xmm0, -0x30(%rbp)
...
because $rbp is not 16-byte aligned.
This can be fixed by adding the missing frame setup instructions at the start
of main in amd64-disp-step-self-call.S:
...
main:
+ pushq %rbp
+ movq %rsp, %rbp
...
Instead, fix this by moving main from the assembly file to the c file, which
has the same effect.
Also remove the done label, which looks like a copy-past left-over. Instead,
add an unreachable function and use it where appropriate.
Do the same for i386 case (which makes the source files identical for the
amd64 and i386 case, but I decided to leave it like that).
Tested on x86_64-freebsd and x86_64-linux.
Diffstat (limited to 'gdb/cli/cli-setshow.c')
0 files changed, 0 insertions, 0 deletions