From: Richard Earnshaw <rearnsha@arm.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Richard.Earnshaw@arm.com, gdb-patches@sources.redhat.com
Subject: Re: RFC/PATCH multi-arch SMASH_TEXT_ADDRESS
Date: Sun, 03 Feb 2002 07:24:00 -0000 [thread overview]
Message-ID: <200202031524.PAA29247@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Sat, 02 Feb 2002 16:48:41 EST." <3C5C5EB9.3040506@cygnus.com>
> FYI, just do this:
>
> gdbarch.sh (SMASH_TEXT_ADDRESS): Add rule.
> gdbarch.h, gdbarch.c: Re-generate.
>
> And then in the gdb directory run:
>
> ./gdbarch.sh
But that makes it too easy :-) Programming should be hard...
>
> It will generate new-gdbarch.[hc] which you can examine/copy into place.
> I noticed slight differences when running this.
>
> > ! #ifdef SMASH_TEXT_ADDRESS
> > ! if (tmpaddr & 1) /* FIXME: delete this line */
> > ! SMASH_TEXT_ADDRESS (tmpaddr);
> > ! #endif
>
>
> I would have been more conservative with this (if
> (SMASH_TEXT_ADDRESS_P()) ... but as you noticed there are only two
> definitions and they both just mask out the bottom bits - the test is
> probably even bogus for HP/UX.
I think the test for "& 1" was probably bogus anyway, regardless of what
other ports might want to define SMASH_TEXT_ADDRESS as. Consider a port
that would incorrectly smash an address with the test removed, I think
that would likely mean that the macro was incorrectly implemented, or that
there is a more serious problem that needs considering. Either way, it
shouldn't be done as a test of a manifest constant.
>
> > + # It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
> > + # ADDR_BITS_REMOVE.
> > + f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr:::core_addr_identity::0
>
>
> I agree. Suggest creating a bug report so someone (else - me?) gets to
> investigate further.
Will do.
> This one was nastier then it first looked, but yes fine.
I bet they nearly always are...
R.
next prev parent reply other threads:[~2002-02-03 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-02 10:00 Richard Earnshaw
2002-02-02 13:48 ` Andrew Cagney
2002-02-03 7:24 ` Richard Earnshaw [this message]
2002-02-04 3:58 ` Richard Earnshaw
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=200202031524.PAA29247@cam-mail2.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.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