Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] mips-tdep.c: Fix mips16 bit rot
Date: Wed, 14 Dec 2011 23:24:00 -0000	[thread overview]
Message-ID: <20111214162117.0b1ce834@mesquite.lan> (raw)
In-Reply-To: <alpine.DEB.1.10.1111231201520.4191@tp.orcam.me.uk>

Hi Maciej,

Sorry it's taken me so long to get back to you this.  I will try to
answer your questions to the best of my ability, but it's been a
while since I've looked at or thought about this code.  I fear
that I might not be of much help...

On Wed, 23 Nov 2011 12:40:37 +0000
"Maciej W. Rozycki" <macro@codesourcery.com> wrote:
>  First of all this construct used in a few places:
> 
> +  if (is_mips16_addr (pc))
> +    pc = unmake_mips16_addr (pc);
> 
> makes me a bit nervous you might be removing the ISA bit for code 
> references where it is the only means of signalling GDB the address is a 
> MIPS16 code address -- that would happen if pc pointed to a location that 
> has no associated symbol information.  While in this case the 
> functionality GDB provides is limited, it still has to work correctly up 
> to expectations, e.g. instruction-level single-stepping has to work and 
> where software stepping is used the MIPS16 BREAK instruction encoding has 
> to be used rather than the MIPS32 one.  Have you verified this 
> functionality has not regressed?  Similarly the MIPS16 heuristic frame 
> unwinder may be affected.
> 
>  Otherwise I'd just be tempted to change all these cases into something 
> functionally equivalent to:
> 
> +  if (msymbol_is_special (lookup_minimal_symbol_by_pc (pc)))
> +    pc = unmake_mips16_addr (pc);
> 
> where the ISA bit is only stripped if there's symbol information 
> indicating this is a piece of MIPS16 code so there's no information lost.

I see your point.  You proposed change looks reasonable to me.

>  Second, you only made corresponding adjustments to 
> mips_eabi_push_dummy_call and mips_o64_push_dummy_call which are the least 
> standard and probably the least used MIPS ABIs.  Any particular reason you 
> did not make similar changes to mips_o32_push_dummy_call or 
> mips_n32n64_push_dummy_call?
> 
>  Also I see you only adjust function pointers that are arguments on their 
> own -- isn't a similar adjustment required for such pointers that are 
> parts of aggregate types as well?

I don't remember enough about what I did roughly a year ago to be able
to answer this.  I think it's likely that changes should be made to the
areas that you've identified.

>  Overall, what was the rationale behing your change? -- as it's unclear to 
> me from your e-mail.  Did you just want to fix test results you discovered 
> that were quite poor or does this change address problems you stumbled 
> across during actual MIPS16 debugging?

The former - I was attempting to fix some very bad test results with respect
to mips16.

Kevin


  reply	other threads:[~2011-12-14 23:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14  0:06 Kevin Buettner
2010-12-14  5:39 ` Joel Brobecker
2010-12-17 21:40 ` Kevin Buettner
2011-11-23 12:41 ` Maciej W. Rozycki
2011-12-14 23:24   ` Kevin Buettner [this message]
2012-05-14 20:11     ` 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=20111214162117.0b1ce834@mesquite.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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