aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-03-03 07:05:23 +0000
committerSteve Chamberlain <sac@cygnus>1992-03-03 07:05:23 +0000
commit96743d3c3033705c391308b45e61686b10dba1d5 (patch)
tree0849cb4d8597111f54dcb0f977e2350704447d9d /gdb/gdbtypes.c
parentbff1c97a6634f6a8dfde48f22bfbd9b85b2e7170 (diff)
downloadgdb-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.c7
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);
}