This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Harvard Architecture issues -- addresses vs pointers
- To: David Taylor <taylor at cygnus dot com>
- Subject: Re: Harvard Architecture issues -- addresses vs pointers
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 23 Feb 2001 20:49:36 -0500
- Cc: gdb at sourceware dot cygnus dot com
- References: <200102082050.PAA07793@texas.cygnus.com>
David Taylor wrote:
>
> I will refer to things as:
>
> . a user address
> . an internal gdb address
> . a target pointer
I'm not quite sure what a ``user address'' is.
Would it be defined as the output the user expects from a program like:
void *v = ...;
void (*f)() = ... ;
long vl = v;
long vf = f;
printf ("vl=%ld vf=%ld\n", vl, vf);
or is it more like a user (printable) representation of a CORE_ADDR.
Thinking about the above the user would expect the GDB commands:
set $vl = (long) v;
set $vf = (long) f;
print $vl, $vf
to print the same output as C code. With commands like:
set $v = (void*) 0x1234
set $f = ((*)()) 0x5678
print $f()
being similar.
Andrew