This is the mail archive of the gdb@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]

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


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