This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace
- From: Tom Tromey <tom at tromey dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Tue, 06 Aug 2019 10:15:34 -0600
- Subject: Re: [PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace
- References: <20190730144123.11135-1-alan.hayward@arm.com>
>>>>> "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