This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: D10V_MAKE_IADDR / D10V_MAKE_DADDR / GDB_TARGET_IS_D10V
On Mon, Jul 24, 2000 at 01:03:09PM -0500, Jim Blandy wrote:
>
> > One thing that you may want to keep in mind is that it may not just
> > be text vs. data. I once wrote a C compiler for a machine that 4
> > different pointer formats (pointers to 16-bit words, pointers to
> > bytes, and 2 different bit pointers). The original machine in the
> > family did not have byte addressing at all, and so when they hacked
> > in byte addressability, the byte pointer was the word pointer
> > shifted left one bit (losing the top bit, which was an indirection
> > bit, and not used for the address itself).
>
> But in all these cases, you must be able to determine the pointer
> format from the C type. Otherwise, the * operator doesn't know what
> to do when applied to some external pointer variable --- the type is
> all the info it has.
>
> So, the conversion macros get the pointer type as an argument --- not
> some hacky my-problem-is-the-only-problem data/text flag.
That was the point I was trying to express.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482