[RFC PATCH v2 0/2] s390x: Add support for SFrame stack backtracing

Jens Remus jremus@linux.ibm.com
Fri Jun 27 13:38:11 GMT 2025


Changes in RFC v2:
- Rebase on top of Claudiu's series v6.
- Sync sframe.h to latest Binutils s390 SFrame support patch series.
- Use macros SFRAME_CFA_OFFSET_DECODE and SFRAME_OFFSET_IS_REGNUM
  that s390 64-bit (s390x) overwrites instead of ifdefs.
- Use s390x/S390X, as done in Binutils. (Indu)
- When in doubt fallback to DWARF stack tracer instead of stopping.
- Implement MD_DETECT_OUTERMOST_FRAME for s390 64-bit (s390x).

This patch series adds s390 64-bit (s390x) support for SFrame.  It is
RFC, as it depends on the following Binutils and Glibc patch series:

It is based on top of Claudiu Zissulescu's Glibc patch series
"[PATCH v6 0/5] glibc: Add SFrame support for stack backtracing",
which enables Glibc to be built with SFrame stack trace information
and enables backtrace() to generate backtraces using SFrame stack trace
information:
https://inbox.sourceware.org/libc-alpha/20250610073353.59446-1-claudiu.zissulescu-ianculescu@oracle.com/

It depends on my Binutils patch series "[PATCH v3 00/11] s390: Support
to generate .sframe in assembler and linker", which enables the GNU
assembler and linker on s390 64-bit (s390x) to generate SFrame stack
trace information:
https://inbox.sourceware.org/binutils/20250627110849.1198336-1-jremus@linux.ibm.com/

The intention to send it early is to provide insight into s390-specifics
and obtain early feedback.

Thanks and regards,
Jens

Jens Remus (2):
  elf: Start SFrame stack trace from PC and CFA
  s390: Add SFrame support for s390 64-bit (s390x) architecture

 debug/backtrace.c                             |   6 +-
 sysdeps/generic/sframe.c                      |  85 +++++++++++----
 sysdeps/generic/sframe.h                      |  64 +++++++++--
 sysdeps/s390/s390-64/sframe.h                 |  50 +++++++++
 .../sysv/linux/s390/s390-64/uw-sigframe.h     | 101 ++++++++++++++++++
 5 files changed, 276 insertions(+), 30 deletions(-)
 create mode 100644 sysdeps/s390/s390-64/sframe.h
 create mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/uw-sigframe.h

-- 
2.48.1



More information about the Libc-alpha mailing list