Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward <Alan.Hayward@arm.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>,
	nd <nd@arm.com>
Subject: Re: [PATCH V2] AArch64 pauth: Indicate unmasked addresses in backtrace
Date: Fri, 09 Aug 2019 14:46:00 -0000	[thread overview]
Message-ID: <714091D9-B336-4D9C-9238-2DBC10B2E030@arm.com> (raw)
In-Reply-To: <955aee56-6b01-47f6-6870-8d561a2083fc@redhat.com>



> On 9 Aug 2019, at 15:17, Pedro Alves <palves@redhat.com> wrote:
> 
> On 8/9/19 2:22 PM, Alan Hayward wrote:
>> It looks like fixing the space just requires an additional call to uiout->text (" “).
>> 
>> 
>> How about I create a new field addr_flags? It would be a generic field into which
>> targets can add whichever fields they want to.
>> 
>> I then could add a call to a new function gdbarch_print_addr_flags() which prints the
>> PAC on AArch64 and nothing on all other targets?
> 
> That sounds like two different things.  You could have the gdbarch method without
> the uiout field.  Not sure what the uiout field buys you.  If CLI and MI are going to
> print the same way, then it doesn't appear useful over field_string.  The gdbarch
> method sounds fine.
> 

I was thinking of the following:

char *flags = gdbarch_print_pc_addr_flags(frame, pc);  /* Returns null or “PAC” or “FOO,BAR” etc */
if (flags)
{
  uiout->text (“ [“);
  uiout->field_string (“addr_flags", flags);
  uiout->text (“]“);
}

addr_flags can be printed by any target that wishes. And PAC only needs to be in
AArch64 specifics.



Alan.

  reply	other threads:[~2019-08-09 14:46 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
2019-08-09 13:22       ` Alan Hayward
2019-08-09 14:17         ` Pedro Alves
2019-08-09 14:46           ` Alan Hayward [this message]
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=714091D9-B336-4D9C-9238-2DBC10B2E030@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.com \
    --cc=palves@redhat.com \
    --cc=tom@tromey.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