Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] gdb/amd64: prologue analysis for Intel APX
@ 2026-10-30 22:01 Stephan Rohr
  2026-10-30 22:02 ` [PATCH 1/2] gdb/amd64: handle pushp, push2 and push2p in the prologue analyzer Stephan Rohr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephan Rohr @ 2026-10-30 22:01 UTC (permalink / raw)
  To: gdb-patches

From: "Rohr, Stephan" <stephan.rohr@intel.com>

Hi all,

this series extends the prologue analyzer of AMD64 to support pushp
(push with the PPX hint), push2 and push2p (two registers per
instruction), and the extended GPRs %r16-r31.  With PPX, clang also
starts a frame pointer prologue with pushp %rpb.  With the extended
analyzer, a "break FUNC" stops at the end of the prologue for functions
without debug info.

Added a new test amd64-apx-extended-prologue-analysis.exp similar to
amd64-extended-prologue-analysis.exp.  It covers the following cases:

  - w/o .cfi directives: frame pointer prologue with push2p and pushp,
    unwound with the prologue analyzer only.
  - with .cfi directives: the same prologue; GDB places the breakpoint
    with the analyzer and unwinds with the .cfi directives.
  - offset initialization: without a frame pointer.  GDB computes the
    frame address from %rsp and the stack space of the analyzed
    prologue.
  - single pushes of %r16 - %r31: with only the EGPR feature, the
    compiler saves 24 registers with single pushes.
  - pushp frame setup: clang starts the frame setup with pushp %rbp.

Each case is tested with code compiled from C-Source and with compiler
generated assembly.

Tested on Diamond Rapids and on hardware that does not support Intel
APX.

I appreciate your feedback.

Thanks
Stephan 

Klaus Gerlicher (2):
  gdb/amd64: handle pushp, push2 and push2p in the prologue analyzer
  gdb/amd64: recognize pushp %rbp as a frame setup

 gdb/amd64-tdep.c                              | 127 ++++++++-
 ...d64-apx-extended-prologue-analysis-clang.S | 139 ++++++++++
 ...md64-apx-extended-prologue-analysis-egpr.S | 187 +++++++++++++
 ...64-apx-extended-prologue-analysis-no-cfi.S | 156 +++++++++++
 ...64-apx-extended-prologue-analysis-offset.S | 153 +++++++++++
 .../amd64-apx-extended-prologue-analysis.S    | 247 ++++++++++++++++++
 .../amd64-apx-extended-prologue-analysis.c    |  96 +++++++
 .../amd64-apx-extended-prologue-analysis.exp  | 198 ++++++++++++++
 8 files changed, 1292 insertions(+), 11 deletions(-)
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis-clang.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis-egpr.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis-no-cfi.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis-offset.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis.c
 create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-extended-prologue-analysis.exp

-- 
2.43.0

________________________________________
Intel Deutschland GmbH 

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany 

Tel: +49 (89) 99143-0 

www.intel.de 

Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman

Chairperson of the Supervisory Board: Sonja Pierer

Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-13 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 22:01 [PATCH 0/2] gdb/amd64: prologue analysis for Intel APX Stephan Rohr
2026-10-30 22:02 ` [PATCH 1/2] gdb/amd64: handle pushp, push2 and push2p in the prologue analyzer Stephan Rohr
2026-10-30 22:02 ` [PATCH 2/2] gdb/amd64: recognize pushp %rbp as a frame setup Stephan Rohr
2026-11-13 15:24 ` [PING][PATCH 0/2] gdb/amd64: prologue analysis for Intel APX Rohr, Stephan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox