This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]