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/varobj.c | |
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/varobj.c')
-rw-r--r-- | gdb/varobj.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 7df7fed..089fc53 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -462,7 +462,16 @@ find_frame_addr_in_frame_chain (CORE_ADDR frame_addr) frame != NULL; frame = get_prev_frame (frame)) { - if (get_frame_base_address (frame) == frame_addr) + /* The CORE_ADDR we get as argument was parsed from a string GDB + output as $fp. This output got truncated to gdbarch_addr_bit. + Truncate the frame base address in the same manner before + comparing it against our argument. */ + CORE_ADDR frame_base = get_frame_base_address (frame); + int addr_bit = gdbarch_addr_bit (get_frame_arch (frame)); + if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT)) + frame_base &= ((CORE_ADDR) 1 << addr_bit) - 1; + + if (frame_base == frame_addr) return frame; } |