aboutsummaryrefslogtreecommitdiff
path: root/libsframe
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2022-12-16 22:01:57 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2022-12-16 22:01:57 -0800
commit9c4b163cb546f0627a4d3106d2750db37d6aed50 (patch)
tree485d52baf463adb9630fe86e55dac8d8715993ca /libsframe
parent28f69152b99fd3a774e9bb9e66496cb1d7fd03b9 (diff)
downloadgdb-9c4b163cb546f0627a4d3106d2750db37d6aed50.zip
gdb-9c4b163cb546f0627a4d3106d2750db37d6aed50.tar.gz
gdb-9c4b163cb546f0627a4d3106d2750db37d6aed50.tar.bz2
libsframe: provide new access API for mangled RA bit
include/ChangeLog: * sframe-api.h (sframe_fre_get_ra_mangled_p): New declaration. ChangeLog: * libsframe/sframe.c (sframe_get_fre_ra_mangled_p): New definition. (sframe_fre_get_ra_mangled_p): New static function.
Diffstat (limited to 'libsframe')
-rw-r--r--libsframe/sframe.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index b17d323..b8fde2f 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -124,6 +124,12 @@ sframe_fre_get_offset_size (unsigned char fre_info)
return SFRAME_V1_FRE_OFFSET_SIZE (fre_info);
}
+static bool
+sframe_get_fre_ra_mangled_p (unsigned char fre_info)
+{
+ return SFRAME_V1_FRE_MANGLED_RA_P (fre_info);
+}
+
/* Access functions for info from function descriptor entry. */
static unsigned int
@@ -640,6 +646,18 @@ sframe_fre_get_ra_offset (sframe_decoder_ctx *dctx,
return sframe_get_fre_offset (fre, SFRAME_FRE_RA_OFFSET_IDX, errp);
}
+/* Get whether the RA is mangled. */
+
+bool
+sframe_fre_get_ra_mangled_p (sframe_decoder_ctx *dctx ATTRIBUTE_UNUSED,
+ sframe_frame_row_entry *fre, int *errp)
+{
+ if (fre == NULL || !sframe_fre_sanity_check_p (fre))
+ return sframe_set_errno (errp, SFRAME_ERR_FRE_INVAL);
+
+ return sframe_get_fre_ra_mangled_p (fre->fre_info);
+}
+
static int
sframe_frame_row_entry_copy (sframe_frame_row_entry *dst, sframe_frame_row_entry *src)
{