This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER.
- From: Alan Modra <amodra at gmail dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, gdb-patches at sourceware dot org, binutils <binutils at sourceware dot org>
- Date: Tue, 4 Oct 2016 08:55:27 +1030
- Subject: Re: [PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER.
- Authentication-results: sourceware.org; auth=none
- References: <20160930161908.6A43511C24D@oc8523832656.ibm.com> <aff72146-3dc5-50ec-3382-fc7a6c917cb1@vnet.ibm.com>
On Mon, Oct 03, 2016 at 03:25:15PM -0500, Peter Bergner wrote:
> On 9/30/16 11:19 AM, Ulrich Weigand wrote:
> > The implementation in the patch does appear to be a bit ad-hoc, however :-)
> > Why would we want to pass that information via a new global variable, if
> > there is already an element "disassembler_options" in the struct
> > disassemble_info that GDB passes to bfd? See e.g. i386_print_insn.
>
> Yes, I saw that code. The problem is that same solution won't work for
> us, since print_insn_*() doesn't look at info->disassembler_options
> at all.
Somewhere in gdb you must be calling disassemble_init_for_target.
Why can't you call that again after setting the cpu (in struct
disassemble_info disassembler_options)?
--
Alan Modra
Australia Development Lab, IBM