diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-08-09 21:36:23 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-08-09 21:36:23 +0000 |
commit | 96baa820df8126165bd3c4a33c561556b21203af (patch) | |
tree | 60cf1938a2c0aaae5d3aab73b553f031138ec99c /gdb/c-valprint.c | |
parent | 10e80b41455f1a386485631b7c170cafe341dcd6 (diff) | |
download | gdb-96baa820df8126165bd3c4a33c561556b21203af.zip gdb-96baa820df8126165bd3c4a33c561556b21203af.tar.gz gdb-96baa820df8126165bd3c4a33c561556b21203af.tar.bz2 |
import gdb-1999-08-09 snapshot
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index f791e4c..f888262 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -403,10 +403,13 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref, } else { - fprintf_filtered (stream, TYPE_UNSIGNED (type) ? "%u" : "%d", - unpack_long (type, valaddr + embedded_offset)); + val = unpack_long (type, valaddr + embedded_offset); + if (TYPE_UNSIGNED (type)) + fprintf_filtered (stream, "%u", (unsigned int) val); + else + fprintf_filtered (stream, "%d", (int) val); fputs_filtered (" ", stream); - LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr + embedded_offset), stream); + LA_PRINT_CHAR ((unsigned char) val, stream); } break; |