diff options
author | Steve Chamberlain <sac@cygnus> | 1992-03-03 07:05:23 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-03-03 07:05:23 +0000 |
commit | 96743d3c3033705c391308b45e61686b10dba1d5 (patch) | |
tree | 0849cb4d8597111f54dcb0f977e2350704447d9d /gdb/gdbtypes.c | |
parent | bff1c97a6634f6a8dfde48f22bfbd9b85b2e7170 (diff) | |
download | gdb-96743d3c3033705c391308b45e61686b10dba1d5.zip gdb-96743d3c3033705c391308b45e61686b10dba1d5.tar.gz gdb-96743d3c3033705c391308b45e61686b10dba1d5.tar.bz2 |
* gdbtypes.c (lookup_pointer_type): initialize the TYPE_LENGTH of
a ptype to reflect the setting of TARGET_PTR_BIT. Set the
TYPE_FLAGS of a ptype to TYPE_FLAG_UNSIGNED.
* tm-h8300.h, h8300-tdep.c, remote-hms.c: personal checkpoint
* printcmd.c (print_address): if ADDR_BITS_REMOVE is defined, use
it before printing out the hex shape of an address.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index c67b41c..a2bf943 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -80,12 +80,13 @@ lookup_pointer_type (type) TYPE_POINTER_TYPE (type) = ptype; /* We assume the machine has only one representation for pointers! */ - /* FIXME: This confuses host<->target data representations, and is a - poor assumption besides. */ - TYPE_LENGTH (ptype) = sizeof (char *); + TYPE_LENGTH (ptype) = TARGET_PTR_BIT / TARGET_CHAR_BIT; TYPE_CODE (ptype) = TYPE_CODE_PTR; + /* pointers are unsigned */ + TYPE_FLAGS(ptype) |= TYPE_FLAG_UNSIGNED; + } return (ptype); } |