diff options
author | Fred Fish <fnf@specifix.com> | 2002-09-10 02:04:38 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 2002-09-10 02:04:38 +0000 |
commit | d0aee0c4b88915e1d0f8facb6a139e972ebee115 (patch) | |
tree | dc22f2712531d34d5cec87c84e285de5dbf545b5 /gdb | |
parent | 4a386c0bd25d8336568864c0507740cdbd79018e (diff) | |
download | gdb-d0aee0c4b88915e1d0f8facb6a139e972ebee115.zip gdb-d0aee0c4b88915e1d0f8facb6a139e972ebee115.tar.gz gdb-d0aee0c4b88915e1d0f8facb6a139e972ebee115.tar.bz2 |
Reviewed and approved by Kevin Buettner <kevinb@redhat.com>
2002-09-09 Fred Fish <fnf@intrinsity.com>
* printcmd.c (print_scalar_formatted): "len" is the number of
target bytes, NOT the number of target bits.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/printcmd.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 07c9412..9df64f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-09-09 Fred Fish <fnf@intrinsity.com> + + * printcmd.c (print_scalar_formatted): "len" is the number of + target bytes, NOT the number of target bits. + 2002-09-09 Elena Zannoni <ezannoni@redhat.com> From: Emmanuel Thome' <thome@lix.polytechnique.fr> diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 2e57050..8542b8a 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -391,10 +391,10 @@ print_scalar_formatted (char *valaddr, struct type *type, int format, int size, val_long = unpack_long (type, valaddr); /* If the value is a pointer, and pointers and addresses are not the - same, then at this point, the value's length is TARGET_ADDR_BIT, not - TYPE_LENGTH (type). */ + same, then at this point, the value's length (in target bytes) is + TARGET_ADDR_BIT/TARGET_CHAR_BIT, not TYPE_LENGTH (type). */ if (TYPE_CODE (type) == TYPE_CODE_PTR) - len = TARGET_ADDR_BIT; + len = TARGET_ADDR_BIT / TARGET_CHAR_BIT; /* If we are printing it as unsigned, truncate it in case it is actually a negative signed value (e.g. "print/u (short)-1" should print 65535 |