Is this "gdb disassembler" code still needed?

Richard Sandiford <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.