From: Peter Bergner <bergner@vnet.ibm.com>
To: Pedro Alves <palves@redhat.com>, Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org, Alan Modra <amodra@gmail.com>,
Ulrich Weigand <uweigand@de.ibm.com>,
Eli Zaretskii <eliz@gnu.org>,
Nick Clifton <nickc@redhat.com>,
binutils <binutils@sourceware.org>
Subject: Re: [PATCH, updated] Add support for setting disassembler-options in GDB for POWER, ARM and S390
Date: Mon, 13 Feb 2017 17:32:00 -0000 [thread overview]
Message-ID: <f0c13b20-5e83-85c3-545b-5e12ac2bcdc7@vnet.ibm.com> (raw)
In-Reply-To: <72237b44-c785-c22d-5664-a87c28a9678a@redhat.com>
On 2/13/17 10:58 AM, Pedro Alves wrote:
> On 02/13/2017 03:52 PM, Yao Qi wrote:
>> These options should be modeled as per-architecture data. We need to
>> define a key to access that data dynamically. grep
>> "static struct gdbarch_data *" in *.c.
>
> If I understand the suggestion correctly, that would make all the different
> POWER (etc.) gdbarch instances have their own instance of the option string.
> I.e., the POWER gdbarch instance determined for the objfile before the program
> is run or GDB connects to a target would have a different set of options than
> the gdbarch instance created based on the POWER-based XML target description
> returned by the (e.g.), remote server, because those are different
> gdbarch object instances. As a result "set disassembler-options" would
> show different options before and after run/connection (and in other
> situations that use different gdbarch objects).
>
> What Alan's implementation achieves instead is that there's only one option
> value string for the whole family of gdbarchs of a given architecture, like
> POWER vs MIPS, vs x86, etc, so that the disassembler options active persist
> across internal uses of all the different gdbarch instances that
> model variants of the same CPU architecture.
s/Alan's/Peter's/. :-) Thank you for explaining what Yao's suggestion
would do. As a user, I'd much prefer setting a disassembler option
(per arch) and having that be used for all of my disassemble commands,
versus to having to set it for each gdbarch instance. I think that
would also fall under the principle of least surprise rule too.
Peter
next prev parent reply other threads:[~2017-02-13 17:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 21:03 Peter Bergner
2017-02-13 15:53 ` Yao Qi
2017-02-13 16:31 ` Peter Bergner
2017-02-13 16:58 ` Pedro Alves
2017-02-13 17:32 ` Peter Bergner [this message]
2017-02-14 17:21 ` Yao Qi
2017-02-14 17:35 ` Pedro Alves
2017-02-13 17:08 ` Peter Bergner
2017-02-13 18:48 ` Peter Bergner
2017-02-14 20:01 ` Pedro Alves
2017-02-15 23:14 ` Peter Bergner
2017-02-15 23:48 ` Alan Modra
2017-02-16 0:21 ` Pedro Alves
2017-02-16 1:59 ` Peter Bergner
2017-02-16 2:09 ` Pedro Alves
2017-02-13 18:52 ` Peter Bergner
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=f0c13b20-5e83-85c3-545b-5e12ac2bcdc7@vnet.ibm.com \
--to=bergner@vnet.ibm.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=nickc@redhat.com \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.com \
--cc=uweigand@de.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).