[PATCH v2 0/5] glibc: Add SFrame support for stack backtracing
claudiu.zissulescu-ianculescu@oracle.com
claudiu.zissulescu-ianculescu@oracle.com
Fri Apr 11 11:34:51 GMT 2025
From: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Hello,
Please find my second round of SFrame stack backtracing.
ABI impact notes:
** Changes in 'struct dl_find_object'
- A new member 'void *dlfo_sframe' is inserted to the structure.
- The member '__dlfo_reserved' is changed, removing one element, which
is a decrease of 64bits.
- The size of the type has not changed, as the new added field (i.e.,
dlfo_sframe) size is of the same size as of the one element removed
from struct memeber __dlfo_reserved. For 32bit systems, a padding is
added to compensate for pointer size change.
** Possible issues
- Automatic ABI checkers may mark this change as an ABI change, thus,
human review and updating of the scripts is required.
- For unknown programs which directly access the '__dlfo_reserved'
field, this change is incompatible. As note, this field should not
be used by anyone as it is reserved for further changes of the
dl_find_object structure.
Other changes:
- The getPC and getSP helper functions are moved to sframe.c file as
they may require machine dependent changes like for s390.
- The dlfo_sframe member is always present.
- The dlfo_flags member is used, bit 0 signalize the presence of
sframe information.
- Updated NEWS file, and other documents.
- Cleanup Aarch64 specific function.
Thank you,
Claudiu
Claudiu Zissulescu (5):
elf: Add SFrame support to _dl_find_object function
elf: Add SFrame stack tracing
configure: Add --enable-sframe option
x86: Add SFrame support for x86 architecture
aarch64: Add SFrame support for aarch64 architecture
INSTALL | 5 +
Makeconfig | 8 +-
NEWS | 2 +
bits/dl_find_object.h | 3 +
config.make.in | 1 +
configure | 128 ++++
configure.ac | 43 ++
debug/backtrace.c | 32 +-
dlfcn/dlfcn.h | 7 +-
elf/dl-find_object.h | 44 +-
manual/dynlink.texi | 25 +-
manual/install.texi | 5 +
sysdeps/generic/Makefile | 1 +
sysdeps/generic/sframe-read.c | 577 ++++++++++++++++++
sysdeps/generic/sframe-read.h | 101 +++
sysdeps/generic/sframe.c | 157 +++++
sysdeps/generic/sframe.h | 367 +++++++++++
sysdeps/generic/uw-sigframe.h | 17 +
sysdeps/unix/sysv/linux/aarch64/uw-sigframe.h | 63 ++
sysdeps/unix/sysv/linux/x86/uw-sigframe.h | 99 +++
sysdeps/x86/bits/dl_find_object.h | 1 +
21 files changed, 1672 insertions(+), 14 deletions(-)
create mode 100644 sysdeps/generic/sframe-read.c
create mode 100644 sysdeps/generic/sframe-read.h
create mode 100644 sysdeps/generic/sframe.c
create mode 100644 sysdeps/generic/sframe.h
create mode 100644 sysdeps/generic/uw-sigframe.h
create mode 100644 sysdeps/unix/sysv/linux/aarch64/uw-sigframe.h
create mode 100644 sysdeps/unix/sysv/linux/x86/uw-sigframe.h
--
2.49.0
More information about the Libc-alpha
mailing list