[Bug target/114116] [14 Regression] Broken backtraces in bootstrapped x86_64 gcc
lukas.graetz@tu-darmstadt.de
gcc-bugzilla@gcc.gnu.org
Thu Feb 29 13:58:02 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114116
Lukas Grätz <lukas.graetz@tu-darmstadt.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lukas.graetz@tu-darmstadt.d
| |e
--- Comment #7 from Lukas Grätz <lukas.graetz@tu-darmstadt.de> ---
(In reply to H.J. Lu from comment #6)
> (In reply to Jakub Jelinek from comment #5)
> > Yeah. Not to mention, one can call backtrace even if -g0; you just don't
> > get nice names for the addresses. Without the patch you get crashes in the
> > unwinder when doing backtrace.
>
> Should we generate REG_CFA_UNDEFINED for unsaved callee-saved registers to
> help unwinder:
>
> https://patchwork.sourceware.org/project/gcc/list/?series=30327
Yes. Also for gdb this is needed.
Perhaps I did something wrong. On my computer, I could get the first patch
working to save rbp, I also applied the patch which should omit the
.cfi_undefined. But somehow, I still not get .cfi_undefined for any of the
examples.
$ ./gcc/host-x86_64-pc-linux-gnu/gcc/cc1 -O3
gcc/gcc/testsuite/gcc.target/i386/pr38534-7.c -o pr38534-7.S
$ cat pr38534-7.S
[...]
no_return_to_caller:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movl $array+67108860, %eax
xorl %r13d, %r13d
[...]
The ".cfi_undefined 13" is still missing...
More information about the Gcc-bugs
mailing list