* dwarf2-frame.c (read_encoded_value): Correct typo. Use
authorDaniel Jacobowitz <drow@false.org>
Mon, 14 May 2007 17:19:48 +0000 (17:19 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 14 May 2007 17:19:48 +0000 (17:19 +0000)
DW_EH_PE_signed if appropriate.

gdb/ChangeLog
gdb/dwarf2-frame.c

index 8bfd0f85b5264a4bd28e7faf6c309eeea814c881..55c0da8ac012686d8c79b70613dd49c163f4d322 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-14  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * dwarf2-frame.c (read_encoded_value): Correct typo.  Use
+       DW_EH_PE_signed if appropriate.
+
 2007-05-14  Paul Brook  <paul@codesourcery.com>
            Daniel Jacobowitz  <dan@codesourcery.com>
 
index 1e1d395e870142d746130821840a04e207acd32b..6af142148d2c3ac624dd8019323ca7aef96a1077 100644 (file)
@@ -1451,7 +1451,7 @@ read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
       base = 0;
       break;
     case DW_EH_PE_pcrel:
-      base = bfd_get_section_vma (unit->bfd, unit->dwarf_frame_section);
+      base = bfd_get_section_vma (unit->abfd, unit->dwarf_frame_section);
       base += (buf - unit->dwarf_frame_buffer);
       break;
     case DW_EH_PE_datarel:
@@ -1482,7 +1482,11 @@ read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
     }
 
   if ((encoding & 0x07) == 0x00)
-    encoding |= encoding_for_size (ptr_len);
+    {
+      encoding |= encoding_for_size (ptr_len);
+      if (bfd_get_sign_extend_vma (unit->abfd))
+       encoding |= DW_EH_PE_signed;
+    }
 
   switch (encoding & 0x0f)
     {