aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-01-29 02:55:48 +0000
committerAlan Modra <amodra@gmail.com>2008-01-29 02:55:48 +0000
commitfefffff8d22c26ea6e69d24097913e2b6adae2e3 (patch)
treedc357604d1891c3fa008384ebafef25048a50145 /binutils
parentccdb9c9f3613bfac4064baa855003cf4c8a57a92 (diff)
downloadgdb-fefffff8d22c26ea6e69d24097913e2b6adae2e3.zip
gdb-fefffff8d22c26ea6e69d24097913e2b6adae2e3.tar.gz
gdb-fefffff8d22c26ea6e69d24097913e2b6adae2e3.tar.bz2
* dwarf.c (display_debug_loc): Correct test for base address
entry when 64-bit host dumping 32-bit object.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dwarf.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3d727ea..60ec244 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,10 @@
2008-01-29 Alan Modra <amodra@bigpond.net.au>
+ * dwarf.c (display_debug_loc): Correct test for base address
+ entry when 64-bit host dumping 32-bit object.
+
+2008-01-29 Alan Modra <amodra@bigpond.net.au>
+
* MAINTAINERS: Remove myself as ix86 maintainer. Add for SPU.
2008-01-28 Nick Clifton <nickc@redhat.com>
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index d4eb4aa..426cf36 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"),