From: Andrew Cagney <ac131313@cygnus.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb@sources.redhat.com
Subject: Re: How to add core addresses (or LM_ADDR problems revisited)
Date: Wed, 03 Oct 2001 08:50:00 -0000 [thread overview]
Message-ID: <3BBB33A6.3000706@cygnus.com> (raw)
In-Reply-To: <1011003080243.ZM22427@ocotillo.lan>
> Second, regarding the types, I (initially) also thought that an offset
> should be represented as some other type (than a CORE_ADDR), but in
> the process of converting existing GDB code to use core_addr_add() and
> core_addr_sub(), I've found that the type of the offset is almost
> always a CORE_ADDR. (Maybe even always.) I suppose it's possible that
> we simply have this detail wrong, but I'm reluctant to change it at
> the moment. (It's rather pervasive...)
Yes, I've noticed this. I still think the difference between two
addresses is an offset, the addition of two addresses being pretty
meaningless, and an address plus offset returns an address.
If I were you, I wouldn't try to fix the actual code - it hasn't
affected things so far so I don't see this change breaking anything.
Instead, I'd just get the functions right and and add a note explaining
the problem of incorrect use. Later, when someone tries to make a
CORE_ADDR into a struct, this second problem can be fixed.
enjoy,
Andrew
PS: DOUBLEST is in a similar situtation.
prev parent reply other threads:[~2001-10-03 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-02 18:31 Kevin Buettner
2001-10-02 19:59 ` Andrew Cagney
2001-10-03 1:03 ` Kevin Buettner
2001-10-03 8:50 ` Andrew Cagney [this message]
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=3BBB33A6.3000706@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb@sources.redhat.com \
--cc=kevinb@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