This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Deal with DW_EH_PE_funcrel encoding in DWARF2 CFI
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 1 May 2004 12:55:26 +0200 (CEST)
- Subject: [PATCH] Deal with DW_EH_PE_funcrel encoding in DWARF2 CFI
This fixes PR gdb/1628. It's a bit of a hack, since the patch
effectively ignores DW_EH_PE_funcrel. As the comment explains, it's
not making things worse. However, for .eh_frame info that uses
DW_CFA_set_loc and DWARF expressions that use addresses things get a
little bit more broken.
Committed to mainline. I'll commit this to the release branch
shortly.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* dwarf2-frame.c (read_encoded_value): Handle DW_EH_PE_funcrel
encondings. Fixes PR gdb/1628.
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.33
diff -u -p -r1.33 dwarf2-frame.c
--- dwarf2-frame.c 1 May 2004 09:52:47 -0000 1.33
+++ dwarf2-frame.c 1 May 2004 10:50:39 -0000
@@ -1088,6 +1088,14 @@ read_encoded_value (struct comp_unit *un
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;