From: Pedro Alves <palves@redhat.com>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace
Date: Thu, 08 Aug 2019 10:33:00 -0000 [thread overview]
Message-ID: <474e8e87-50d4-874f-787f-ef5f5fbb6cc3@redhat.com> (raw)
In-Reply-To: <F3D7A960-329A-4BDA-A251-87828CF3E459@arm.com>
On 8/8/19 9:55 AM, Alan Hayward wrote:
> gdb/doc/ChangeLog:
>
> 2019-08-08 Alan Hayward <alan.hayward@arm.com>
>
> * gdb.texinfo (AArch64 Pointer Authentication): Fix typo.
Please merge this part as obvious.
> I hadnât realised the implications doing that would have, and had assumed
> you couldnât add to a field that had already been used.
>
> I had (prematurely) pushed the patch. Is this additional fix ok?
I don't think so,
> diff --git a/gdb/stack.c b/gdb/stack.c
> index 0859815baf..c599caf51c 100644
> --- a/gdb/stack.c
> +++ b/gdb/stack.c
> @@ -1301,7 +1301,7 @@ print_frame (const frame_print_options &fp_opts,
> {
> uiout->field_core_addr ("addr", gdbarch, pc);
> if (get_frame_pc_masked (frame))
> - uiout->field_string ("pac", " [PAC]");
> + uiout->field_string ("addr", " [PAC]");
> }
> else
> uiout->field_string ("addr", "<unavailable>",
>
... because I think that this results in MI printing two different "addr" attributes.
Instead, you'll need to build a string, with e.g., string_printf,
and use uiout->field_string with ui_out_style_kind::ADDRESS style,
so that MI outputs one single "addr" attribute.
Please try "gdb -i=mi". You can still type CLI commands, so just "(gdb) start"
and running to main, so that GDB prints the frame in the *stop event should
be sufficient to trigger this.
BTW, there are two other places where we output the "addr" field
in the file. Do you want to include "[PAC]" in those? If so,
then factoring out the "addr" printing to a separate function
would be appropriate.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-08-08 10:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 14:41 Alan Hayward
2019-08-06 16:15 ` Tom Tromey
2019-08-07 12:35 ` Alan Hayward
2019-08-07 19:24 ` Pedro Alves
2019-08-08 8:55 ` Alan Hayward
2019-08-08 10:33 ` Pedro Alves [this message]
2019-08-09 13:22 ` Alan Hayward
2019-08-09 14:17 ` Pedro Alves
2019-08-09 14:46 ` Alan Hayward
2019-08-09 16:51 ` Pedro Alves
2019-08-08 16:58 ` Tom Tromey
2019-08-09 14:11 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=474e8e87-50d4-874f-787f-ef5f5fbb6cc3@redhat.com \
--to=palves@redhat.com \
--cc=Alan.Hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox