This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 Wed, Oct 05, 2016 at 10:00:45PM -0500, Peter Bergner wrote:
> On 10/3/16 5:25 PM, Alan Modra wrote:
> > 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)?
> 
> We (rs6000-tdep.c) don't call disassemble_init_for_target().  That is done
> by architecture independent gdb code before gdb_print_insn_powerpc() is
> ever called.  We could call it from there, but as I mentioned in one of
> my previous notes, we'd be doing that before every insn we emit, which
> would be very expensive.
> 
> The problem is, currently there is no way for the target to catch the
> disassembly initialization process to modify the struct disassemble_info
> disassembler_options value before we start emitting insns.  That said,
> how about the following patch which adds that ability?

Thanks, the opcodes side of this patch looks OK to me.

-- 
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]