This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]