aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-06-17 18:49:37 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-06-17 18:49:37 +0000
commit1fac167a7619ad8291064db597b1884adfcbdf4a (patch)
tree23ed0083678d6de258c1cbfb1b373ac84aa30bc8 /gdb/printcmd.c
parenta78c2d625ffe6bf34934991e815db484d3393a76 (diff)
downloadgdb-1fac167a7619ad8291064db597b1884adfcbdf4a.zip
gdb-1fac167a7619ad8291064db597b1884adfcbdf4a.tar.gz
gdb-1fac167a7619ad8291064db597b1884adfcbdf4a.tar.bz2
ChangeLog:
* printcmd.c (print_scalar_formatted): Always truncate unsigned data types. * cli-dump.c (struct callback_data): Change type of load_offset to CORE_ADDR. (restore_binary_file): Update type casts. (restore_command): Parse load_offset as address, not long. * utils.c (string_to_core_addr): Do not sign-extend value. * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base before comparing against requested frame address. testsuite/ChangeLog: * gdb.base/dump.exp: Handle SPU like 64-bit platforms.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index c95b156..eeffa6e 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -407,7 +407,7 @@ print_scalar_formatted (const void *valaddr, struct type *type,
/* 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
(if shorts are 16 bits) instead of 4294967295). */
- if (options->format != 'd')
+ if (options->format != 'd' || TYPE_UNSIGNED (type))
{
if (len < sizeof (LONGEST))
val_long &= ((LONGEST) 1 << HOST_CHAR_BIT * len) - 1;