From: Fernando Nasser <fnasser@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>,
gdb-patches@sources.redhat.com, Nick Clifton <nickc@cygnus.com>
Subject: Re: RFA: [buildsym.c] Turn off unused addr bits in linetable
Date: Thu, 15 Mar 2001 16:27:00 -0000 [thread overview]
Message-ID: <3AB15D24.AA6457B9@redhat.com> (raw)
In-Reply-To: <3AAE5652.8EDD98FA@redhat.com>
Andrew,
I looked at all the targets that define ADDR_BITS_REMOVE() (which are
arm, h8500, m88k, mips, pa, w65, z8k and sh) and all that define
BREAKPOINT_FROM_PC() (which are arm, mips, mcore and mn10300, as far as
I can tell).
I am convinced that this is the right thing to do. I really wonder, in
some cases, how could it have worked without it (maybe the stub or the
OS cleared the bits for us).
Anyway, there is only one way of knowing it for sure. The only thing we
know right now is that ARM is broken without it.
OK to commit?
Fernando
Fernando Nasser wrote:
>
> Andrew Cagney wrote:
> >
> > Fernando Nasser wrote:
> > >
> > > Some systems like ARM may have extra bits set in the address to indicate
> > > a mode or something else (the LSB=1 means thumb mode for ARM).
> > >
> > > So, before storing line number addresses we may need to turn this bits
> > > off as they may be passed to gdb with the bits on as result of
> > > relocation (ld has no way of knowing it is for a line table entry).
> > >
> > > The following patch passes the line addresses through the target
> > > dependent macro ADDR_BITS_REMOVE() before storing it on the table.
> > >
> > > OK to commit?
> > >
> > > ChangeLog:
> > >
> > > * buildsym.c (record_line): Turn off unused addr bits.
> >
> > I'm not sure about this. The ARM has two ways of identifying THUMB code
> > - the LSB and a tacky symbol lookup.
> >
>
> Yes, but the loader relocation produces _some_ thumb addresses with the
> LSB bit on. The bit in the symbol table is only used to detect thumb
> addresses that had the bit turned off (I have a second patch that
> optimizes the ARM implementation of ADDR_BITS_REMOVE() but it is not
> necessary for correctness).
>
> > Others, such as MIPS/MIPS16 don't. I'm not sure how this will affect
> > that target. Does the code that uses this address of line also ``turn
> > off unused addr bits''?
> >
>
> Well, they should. BRAKPOINT_FROM_PC() is supposed to make the
> necessary address adjustments. In the ARM case, it does turn off the
> thumb bit (the others will never be set where it is used).
>
> I don't have a MIPS target to test. I will depend on someone doing it
> for me. I will take a look at the macros implementation though.
>
> Thanks for the heads up.
>
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
next prev parent reply other threads:[~2001-03-15 16:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-12 17:01 Fernando Nasser
2001-03-12 17:11 ` Michael Snyder
2001-03-13 8:52 ` Andrew Cagney
2001-03-13 9:21 ` Fernando Nasser
2001-03-15 16:27 ` Fernando Nasser [this message]
2001-03-15 17:58 ` Andrew Cagney
2001-04-01 17:37 ` Elena Zannoni
2001-04-06 6:23 ` Fernando Nasser
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=3AB15D24.AA6457B9@redhat.com \
--to=fnasser@redhat.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=nickc@cygnus.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