This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC/RFA] gdb extension for Harvard architectures
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [RFC/RFA] gdb extension for Harvard architectures
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: 02 Oct 2001 14:59:30 -0500
- Cc: Michael Snyder <msnyder at cygnus dot com>,gdb-patches at sources dot redhat dot com
- References: <3BB4D843.A92818B9@cygnus.com> <3BB512A9.6050801@cygnus.com><3BB5195F.6050603@cygnus.com>
Andrew Cagney <ac131313@cygnus.com> writes:
> Would it be better if the cast operator, by default, preserved the
> address space of the pointer being cast?
That would get a bit hairy. If I've got a value of the type:
(@code int * @code * @code * @code)
--- that is, "a pointer in code space to a pointer in code space to a
pointer in code space to an int in code space" --- and cast it to
(int **)
(note that I've dropped a layer of pointers here), how far down do we
go? Does that become a `@code int * @code * @code'? Or just a `int
* @code *'? It's a bit weird.
I kind of think that casts should just work the normal way. People
working on machines with separate address spaces have to think a
little harder --- I don't think we can really conceal that.