This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Harvard Architecture issues -- addresses vs pointers

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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]