[PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace

Tom Tromey tom@tromey.com
Tue Aug 6 16:15:00 GMT 2019


>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:

Alan> Armv8.3-a Pointer Authentication causes the function return address to be
Alan> obfuscated on entry to some functions. GDB must unmask the link register in
Alan> order to produce a backtrace.

Alan> The following patch adds markers of [PAC] to the bracktrace, to indicate
Alan> which addresses needed unmasking.  This includes the backtrace when using MI.

Thanks for the patch.  I don't think this was re-reviewed?

Alan> --- a/gdb/frame.c
Alan> +++ b/gdb/frame.c
Alan> @@ -124,6 +124,8 @@ struct frame_info
Alan>    struct {
Alan>      enum cached_copy_status status;
Alan>      CORE_ADDR value;
Alan> +    /* Did VALUE require unmasking when being read.  */
Alan> +    bool masked;
Alan>    } prev_pc;

I think putting the new field between "status" and "value" will pack the
structure a bit better.

Alan> +bool
Alan> +get_frame_pc_masked (struct frame_info *frame)

Maybe make the parameter "const"?  I see there isn't much use of const
in frame.h, but on the other hand, that's probably just historical and
not required.

Otherwise the patch looks fine to me.  It is ok.  I'd prefer those
changes but if you'd prefer not, a note to that effect is fine.

thanks,
Tom



More information about the Gdb-patches mailing list