diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-17 18:49:37 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-17 18:49:37 +0000 |
commit | 1fac167a7619ad8291064db597b1884adfcbdf4a (patch) | |
tree | 23ed0083678d6de258c1cbfb1b373ac84aa30bc8 /gdb/cli | |
parent | a78c2d625ffe6bf34934991e815db484d3393a76 (diff) | |
download | gdb-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/cli')
-rw-r--r-- | gdb/cli/cli-dump.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 96e6111..82062a1 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -428,7 +428,7 @@ add_dump_command (char *name, void (*func) (char *args, char *mode), /* Opaque data for restore_section_callback. */ struct callback_data { - long load_offset; + CORE_ADDR load_offset; CORE_ADDR load_start; CORE_ADDR load_end; }; @@ -533,8 +533,8 @@ restore_binary_file (char *filename, struct callback_data *data) printf_filtered ("Restoring binary file %s into memory (0x%lx to 0x%lx)\n", filename, - (unsigned long) data->load_start + data->load_offset, - (unsigned long) data->load_start + data->load_offset + len); + (unsigned long) (data->load_start + data->load_offset), + (unsigned long) (data->load_start + data->load_offset + len)); /* Now set the file pos to the requested load start pos. */ if (fseek (file, data->load_start, SEEK_SET) != 0) @@ -584,7 +584,7 @@ restore_command (char *args, int from_tty) /* Parse offset (optional). */ if (args != NULL && *args != '\0') data.load_offset = - parse_and_eval_long (scan_expression_with_cleanup (&args, NULL)); + parse_and_eval_address (scan_expression_with_cleanup (&args, NULL)); if (args != NULL && *args != '\0') { /* Parse start address (optional). */ |