Skip to content
Snippets Groups Projects
Commit 49948bce authored by Indu Bhagat's avatar Indu Bhagat
Browse files

objdump/readelf: sframe: emit marker for FREs with mangled RA

In the textual dump of the SFrame section, when an SFrame FRE recovers a
mangled RA, use string "[s]" in the output to indicate that the return
address is a signed (mangled) one.

ChangeLog:

        * libsframe/sframe-dump.c (dump_sframe_func_with_fres): Postfix
	with "[s]" if RA is signed with authorization code.
parent 9c4b163c
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx, ...@@ -116,7 +116,7 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
char temp[100]; char temp[100];
memset (temp, 0, 100); memset (temp, 0, 100);
printf ("\n %-7s%-8s %-10s%-10s%-10s", "STARTPC", fde_type_marker, "CFA", "FP", "RA"); printf ("\n %-7s%-8s %-10s%-10s%-13s", "STARTPC", fde_type_marker, "CFA", "FP", "RA");
for (j = 0; j < num_fres; j++) for (j = 0; j < num_fres; j++)
{ {
sframe_decoder_get_fre (sfd_ctx, funcidx, j, &fre); sframe_decoder_get_fre (sfd_ctx, funcidx, j, &fre);
...@@ -152,7 +152,14 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx, ...@@ -152,7 +152,14 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
sprintf (temp, "c%+d", ra_offset); sprintf (temp, "c%+d", ra_offset);
else else
strcpy (temp, "u"); strcpy (temp, "u");
printf ("%-10s", temp); /* Mark SFrame FRE's RA information with "[s]" if the RA is mangled
with signature bits. */
const char *ra_mangled_p_str
= ((sframe_fre_get_ra_mangled_p (sfd_ctx, &fre, &err[2]))
? "[s]" : " ");
size_t ra_mangled_p_str_size = strlen (ra_mangled_p_str);
strncat (temp, ra_mangled_p_str, ra_mangled_p_str_size);
printf ("%-13s", temp);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment