[PATCH, RFC] Add support for choosing disassembler cpu in GDB for POWER.

Alan Modra amodra@gmail.com
Mon Oct 3 22:25:00 GMT 2016


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



More information about the Binutils mailing list