This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Is this "gdb disassembler" code still needed?
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gdb at sourceware dot org
- Cc: macro at codesourcery dot com
- Date: Wed, 26 Jun 2013 19:35:08 +0100
- Subject: Is this "gdb disassembler" code still needed?
Hi,
opcodes/mips-dis.c has some code marked "For gdb disassembler, ...".
(1) For jumps in the standard encoding:
/* For gdb disassembler, force odd address on jalx. */
if (info->flavour == bfd_target_unknown_flavour
&& strcmp (opp->name, "jalx") == 0)
info->target |= 1;
(2) For MIPS16 branches:
if (pcrel && branch
&& info->flavour == bfd_target_unknown_flavour)
/* For gdb disassembler, maintain odd address. */
info->target |= 1;
(3) For MIPS16 jumps:
if (!jalx && info->flavour == bfd_target_unknown_flavour)
/* For gdb disassembler, maintain odd address. */
l |= 1;
(4) For microMIPS jumps:
/* For gdb disassembler, force odd address on jalx. */
if (info->flavour == bfd_target_unknown_flavour
&& strcmp (op->name, "jalx") == 0)
info->target |= 1;
(4) seems like it's doing the opposite of (3), whereas I'd have expected
it to do the same. It doesn't like microMIPS has the equivalent of (2).
(Hope I'm reading this right.)
Do you know if this special handling is still needed? If so, is the
current behaviour intentional?
Thanks,
Richard