From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Jim Blandy Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] gdb extension for Harvard architectures Date: Wed, 10 Oct 2001 12:31:00 -0000 Message-id: <3BC4A1E8.8010801@cygnus.com> References: <3BB4D843.A92818B9@cygnus.com> <3BB512A9.6050801@cygnus.com> <3BB5195F.6050603@cygnus.com> <3BBA2DC9.5060500@cygnus.com> <3BBA3B03.B864ABE0@cygnus.com> <3BBA54AE.3080104@cygnus.com> <3BC3EBAC.50609@cygnus.com> <3BC49096.6050001@cygnus.com> X-SW-Source: 2001-10/msg00119.html > Andrew Cagney writes: > >> > Andrew Cagney 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. Yes, I just said that. > What's your point? ``With regard to a @data->@io pointer. That [my comment] is probably wrong'' vis: > having a @data -> @io space pointer sitting in code memory, while sick, is still plausable.