public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] objdump/readelf: sframe: emit marker for SFrame FDE with B key
@ 2022-12-22 18:20 Indu Bhagat
  0 siblings, 0 replies; only message in thread
From: Indu Bhagat @ 2022-12-22 18:20 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

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

commit 95e829affb0a46394fd87048e7599ce950eabf5f
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Thu Dec 22 09:57:27 2022 -0800

    objdump/readelf: sframe: emit marker for SFrame FDE with B key
    
    ChangeLog:
    
            * libsframe/sframe-dump.c (is_sframe_abi_arch_aarch64): New
            definition.
            (dump_sframe_func_with_fres): Emit a string if B key is used.

Diff:
---
 libsframe/sframe-dump.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 5f778bee338..c00ff401685 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -25,6 +25,21 @@
 
 #define SFRAME_HEADER_FLAGS_STR_MAX_LEN 50
 
+/* Return TRUE if the SFrame section is associated with the aarch64 ABIs.  */
+
+static bool
+is_sframe_abi_arch_aarch64 (sframe_decoder_ctx *sfd_ctx)
+{
+  bool aarch64_p = false;
+
+  unsigned char abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
+  if ((abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG)
+      || (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE))
+    aarch64_p = true;
+
+  return aarch64_p;
+}
+
 static void
 dump_sframe_header (sframe_decoder_ctx *sfd_ctx)
 {
@@ -113,6 +128,10 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
 	  func_start_pc_vma,
 	  func_size);
 
+  if (is_sframe_abi_arch_aarch64 (sfd_ctx)
+      && (SFRAME_V1_FUNC_PAUTH_KEY (func_info) == SFRAME_AARCH64_PAUTH_KEY_B))
+    printf (", pauth = B key");
+
   char temp[100];
   memset (temp, 0, 100);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-22 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 18:20 [binutils-gdb] objdump/readelf: sframe: emit marker for SFrame FDE with B key Indu Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).