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.
This commit is contained in:
Ulrich Weigand
2009-06-17 18:49:37 +00:00
parent a78c2d625f
commit 1fac167a76
7 changed files with 39 additions and 18 deletions

View File

@@ -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;
}