[binutils-gdb] include: sframe: add SFRAME_V2_ prefixed macro names for FDE

Indu Bhagat ibhagat@sourceware.org
Wed Dec 24 08:41:56 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=610a98f0f88b184c2f24f51620d344b7ad36b230

commit 610a98f0f88b184c2f24f51620d344b7ad36b230
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Wed Dec 24 00:41:18 2025 -0800

    include: sframe: add SFRAME_V2_ prefixed macro names for FDE
    
    Such a change for readability only.  SFrame V1 is now obsolete, and with
    newer versions like V3 or later, its likely better to have macro names
    reflect the applicable version.
    
    Add new macro names for FDE information related macros.
    
    Reviewed-by: Jens Remus <jremus@linux.ibm.com>
    
    include/
            * sframe.h (SFRAME_V2_FUNC_INFO): New definition.
            (SFRAME_V2_FUNC_FRE_TYPE): Likewise.
            (SFRAME_V2_FUNC_PC_TYPE): Likewise.
            (SFRAME_V2_FUNC_PAUTH_KEY): Likewise.
            (SFRAME_V2_FUNC_INFO_UPDATE_PAUTH_KEY): Likewise.

Diff:
---
 include/sframe.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/sframe.h b/include/sframe.h
index d2a3c8390bf..7458f79c487 100644
--- a/include/sframe.h
+++ b/include/sframe.h
@@ -227,6 +227,18 @@ typedef struct sframe_func_desc_entry_v2
 #define SFRAME_V1_FUNC_INFO_UPDATE_PAUTH_KEY(pauth_key, fde_info) \
   ((((pauth_key) & 0x1) << 5) | ((fde_info) & 0xdf))
 
+/* SFrame V2 has similar SFrame FDE representation as SFrame V1.  */
+
+#define SFRAME_V2_FUNC_INFO(fde_type, fre_enc_type) \
+  (SFRAME_V1_FUNC_INFO (fde_type, fre_enc_type))
+
+#define SFRAME_V2_FUNC_FRE_TYPE(data)    (SFRAME_V1_FUNC_FRE_TYPE (data))
+#define SFRAME_V2_FUNC_PC_TYPE(data)     (SFRAME_V1_FUNC_FDE_TYPE (data))
+#define SFRAME_V2_FUNC_PAUTH_KEY(data)   (SFRAME_V1_FUNC_PAUTH_KEY (data))
+
+#define SFRAME_V2_FUNC_INFO_UPDATE_PAUTH_KEY(pauth_key, fde_info) \
+  SFRAME_V1_FUNC_INFO_UPDATE_PAUTH_KEY (pauth_key, fde_info)
+
 /* Size of stack frame offsets in an SFrame Frame Row Entry.  A single
    SFrame FRE has all offsets of the same size.  Offset size may vary
    across frame row entries.  */


More information about the Binutils-cvs mailing list