This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Harvard Architecture issues -- addresses vs pointers
- To: gdb at sourceware dot cygnus dot com
- Subject: Harvard Architecture issues -- addresses vs pointers
- From: David Taylor <taylor at cygnus dot com>
- Date: Thu, 08 Feb 2001 15:50:49 -0500
I will refer to things as:
. a user address
. an internal gdb address
. a target pointer
For most targets, all three are the same thing.
GDB clearly currently distinguishes between the last two -- an
internal gdb address vs a target pointer, with the former living in a
CORE_ADDR.
I would maintain that while, long term, a user address should be
separated from the other two, that gdb does not currently do so. And
that if you peruse the code, modulo an occassional bug, you'll become
convinced that currently, gdb treats user addresses and internal gdb
addresses as the same thing.
I feel that a user address should always mean the same thing.
And that, for example,
x/x 0x12345678
x/i 0x12345678
should both read the same set of bytes from the target. That the
interpretation of 0x12345678 -- as a specific location within a
specific address space -- should not depend upon whether the user
typed /x or /i. That it should not be the case that one returns
something from the data space and the other from the instruction
space.
Comments?