This is the mail archive of the gdb-patches@sources.redhat.com 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] Don't clobber info->mach in gdb_print_insn_mips


So you're ok if I delete that bit of gdb_print_insn_mips?


Works for me, though I assume that it was put there for a
reason.

The local-to-gdb disasembler functions pre-date libopcodes. I think what's happened is that these wrappers have been accumulating with workarounds to bugs that should have been fixed in libopcodes.


`objdump -d' for instance needs to work, and in that situtation the disassembler has no additional information.

> Perhaps a better fix is something like:

if (proc_desc) { if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)) info->mach = bfd_mach_mips16; } else { if (pc_is_mips16 (memaddr)) info->mach = bfd_mach_mips16; }

which would leave info->mach alone unless pc_is_mips16 is true.

True I'll add it with a comment questioning it's need :-)


Andrew



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