summaryrefslogtreecommitdiff
path: root/src/dwarf_eh.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dwarf_eh.h')
-rw-r--r--src/dwarf_eh.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dwarf_eh.h b/src/dwarf_eh.h
index 35b9af1..02d8a11 100644
--- a/src/dwarf_eh.h
+++ b/src/dwarf_eh.h
@@ -193,6 +193,7 @@ static int64_t read_sleb128(dw_eh_ptr_t *data)
static uint64_t read_value(char encoding, dw_eh_ptr_t *data)
{
enum dwarf_data_encoding type = get_encoding(encoding);
+ //fprintf(stderr, "Loading (encoding %x) from %p\n", (int)encoding, *data);
uint64_t v;
switch (type)
{
@@ -235,6 +236,7 @@ static uint64_t resolve_indirect_value(_Unwind_Context *c,
int64_t v,
dw_eh_ptr_t start)
{
+ //fprintf(stderr, "resolving(encoding %x) from %p\n", (int)get_base(encoding), (void*)(intptr_t)v);
switch (get_base(encoding))
{
case DW_EH_PE_pcrel:
@@ -251,6 +253,7 @@ static uint64_t resolve_indirect_value(_Unwind_Context *c,
default:
break;
}
+ //fprintf(stderr, "is indirect %p\n", is_indirect(encoding));
// If this is an indirect value, then it is really the address of the real
// value
// TODO: Check whether this should really always be a pointer - it seems to
@@ -332,6 +335,7 @@ static inline struct dwarf_eh_lsda parse_lsda(_Unwind_Context *context,
// spec says, but does seem to be how G++ indicates this.
lsda.type_table = 0;
lsda.type_table_encoding = *data++;
+ //fprintf(stderr, "Type table Encoding: %x\n", (int)lsda.type_table_encoding);
if (lsda.type_table_encoding != DW_EH_PE_omit)
{
v = read_uleb128(&data);
@@ -340,6 +344,9 @@ static inline struct dwarf_eh_lsda parse_lsda(_Unwind_Context *context,
lsda.type_table = type_table;
//lsda.type_table = (uintptr_t*)(data + v);
}
+#if __arm__
+ lsda.type_table_encoding = (DW_EH_PE_pcrel | DW_EH_PE_indirect);
+#endif
lsda.callsite_encoding = (enum dwarf_data_encoding)(*(data++));