Harvard Architecture issues -- addresses vs pointers
Andrew Cagney
ac131313@cygnus.com
Fri Feb 23 17:51:00 GMT 2001
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
More information about the Gdb
mailing list