Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Richard Sandiford <rdsandiford@googlemail.com>
To: gdb@sourceware.org
Cc: macro@codesourcery.com
Subject: Is this "gdb disassembler" code still needed?
Date: Wed, 26 Jun 2013 18:35:00 -0000	[thread overview]
Message-ID: <87d2r83elf.fsf@talisman.default> (raw)

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


             reply	other threads:[~2013-06-26 18:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 18:35 Richard Sandiford [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2r83elf.fsf@talisman.default \
    --to=rdsandiford@googlemail.com \
    --cc=gdb@sourceware.org \
    --cc=macro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox