Re: [RFC/RFA] gdb extension for Harvard architectures

Jim Blandy
2001-10-10T12:15:00Z

Andrew Cagney <ac131313@cygnus.com> writes:
> > Andrew Cagney <ac131313@cygnus.com> writes:
> >
> >> With regard to a @data->@io pointer. That is probably wrong. Pointers,
> >> which are typically implemented as address registers (not to be confused
> >> with GDB's core addr), have a fixed size for a given address space.
> >
> >
> > Not sure what you mean here. A value of type `@io foo *' is perfectly
> > meaningful. Its size depends on characteristics of the I/O space.
>
> What about ``@io int *@code''? The pointer's size is independant (well
> at least for the moment) of the source address space. Hence the
> attribute attached to the pointer (instead of pointee) adds nothing.

The declaration

@io int * @code x;

would declare a variable x in code space that points to an int in io
space. Of course, GDB doesn't do declarations.

For casts, sure; the latter qualifier in `(@io int * @code) 0x10' is
meaningless. Address space qualifiers are meaningless applied to
rvalues, as are `const' and `volatile'. In `(int * const) x', the
`const' is meaningless, too, because the result of a cast expression
isn't an lvalue.

What's your point?