Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Is this "gdb disassembler" code still needed?
@ 2013-06-26 18:35 Richard Sandiford
  2013-06-26 19:08 ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Sandiford @ 2013-06-26 18:35 UTC (permalink / raw)
  To: gdb; +Cc: macro

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-31 21:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 18:35 Is this "gdb disassembler" code still needed? Richard Sandiford
2013-06-26 19:08 ` Maciej W. Rozycki
2013-06-26 22:10   ` Richard Sandiford
2013-07-31 16:24     ` Maciej W. Rozycki
2013-07-31 17:24       ` Richard Sandiford
2013-07-31 21:58         ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox