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: gdb-patches at sources dot redhat dot com
- Subject: Re: [RFC/RFA] gdb extension for Harvard architectures
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Wed, 03 Oct 2001 11:50:50 -0700
- Organization: Red Hat
- References: <3BB4D843.A92818B9@cygnus.com> <3BB512A9.6050801@cygnus.com> <3BB5195F.6050603@cygnus.com> <3BBB50C0.BD01BF20@cygnus.com> <3BBB5391.4010001@cygnus.com>
Andrew Cagney wrote:
>
> >
> > Correct (AFAIK).
> >
> >
> >> you could end up printing a
> >> value from a completly different address space.
> >
> >
> > The above operation works even without my change. Since (int*)
> > is interpreted as a naturally "data-like" expression, the above
> > will give you the int that lives in the data-space address corresponding
> > to the code-space address of "function".
> >
> > What my change _adds_ to this picture is the ability to say
> >
> > print *(@code int *) function
> >
> > which will print the int that resides in the CODE-SPACE address
> > corresponding to the address of "function". This is something
> > that you cannot do without my change.
>
> Without change. My contention is that the user is almost never going to
> want to do what you just described. Why make what the user is going to
> want to do hard?
This whole change was prompted by a user's request to be able
to do just that. Well, actually, he wanted to be able to do
set *(@code short *) myfunction = 0xabcd