* dwarf2-frame.c (read_encoded_value): Handle DW_EH_PE_funcrel
authorMark Kettenis <kettenis@gnu.org>
Sat, 1 May 2004 10:55:19 +0000 (10:55 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sat, 1 May 2004 10:55:19 +0000 (10:55 +0000)
encondings.  Fixes PR gdb/1628.

gdb/ChangeLog
gdb/dwarf2-frame.c

index 937b6f3f0ffe7465acbd925762bee83e7d43abe3..dafa5bd1a813c056893c858854ed7597a85f4f67 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-01  Mark Kettenis  <kettenis@gnu.org>
 
+       * dwarf2-frame.c (read_encoded_value): Handle DW_EH_PE_funcrel
+       encondings.  Fixes PR gdb/1628.
+
        * dwarf2-frame.c (execute_cfa_program): Complain if we encounter a
        DW_CFA_restore state without a matching DW_CFA_remember_state
        instead of aborting.  Fixes PR backtrace/1589.
index fafc8fc6574914109b80e98d5faed65c52aa6edb..fccb94d3e33eca562d012fa93d8906647d32d65a 100644 (file)
@@ -1088,6 +1088,14 @@ read_encoded_value (struct comp_unit *unit, unsigned char encoding,
     case DW_EH_PE_textrel:
       base = unit->tbase;
       break;
+    case DW_EH_PE_funcrel:
+      /* FIXME: kettenis/20040501: For now just pretend
+         DW_EH_PE_funcrel is equivalent to DW_EH_PE_absptr.  For
+         reading the initial location of an FDE it should be treated
+         as such, and currently that's the only place where this code
+         is used.  */
+      base = 0;
+      break;
     case DW_EH_PE_aligned:
       base = 0;
       offset = buf - unit->dwarf_frame_buffer;