diff options
author | Alan Modra <amodra@bigpond.net.au> | 2008-01-29 02:55:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2008-01-29 02:55:48 +0000 |
commit | 81d2fd04d77e81f07cef361a0d9e2ae1a3e02304 (patch) | |
tree | 007e40b7fe8e7bdbb1c3debcf19ea4ed0aa5d284 /binutils/dwarf.c | |
parent | 6a575d36da93250720db220cba3f1b151ddf23f6 (diff) | |
download | binutils-redhat-81d2fd04d77e81f07cef361a0d9e2ae1a3e02304.tar.gz |
* dwarf.c (display_debug_loc): Correct test for base address
entry when 64-bit host dumping 32-bit object.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index d4eb4aa617..426cf36ec6 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -2618,6 +2618,7 @@ display_debug_loc (struct dwarf_section *section, void *file) { unsigned long begin; unsigned long end; + unsigned long minus_one; unsigned short length; unsigned long offset; unsigned int pointer_size; @@ -2678,7 +2679,10 @@ display_debug_loc (struct dwarf_section *section, void *file) } /* Check base address specifiers. */ - if (begin == -1UL && end != -1UL) + minus_one = -1; + if (pointer_size < sizeof (minus_one)) + minus_one = (1L << (pointer_size * 8)) - 1; + if (begin == minus_one && end != minus_one) { base_address = end; printf (_(" %8.8lx %8.8lx %8.8lx (base address)\n"), |