summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-10-15 12:26:49 -0700
committerRoland McGrath <roland@redhat.com>2009-10-15 12:26:49 -0700
commit9ca7bc4cb83845372375398006ec04e3f7df1235 (patch)
treeef35e356ba2c00ac133a65bafb1bc17bf13bd31b
parentf80c90785db8af356791a3d88436a33b292ae6a4 (diff)
More grokage of DWARF4 forms.
-rw-r--r--libdw/ChangeLog5
-rw-r--r--libdw/libdw_form.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 2208f772..33a18baf 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-15 Roland McGrath <roland@redhat.com>
+
+ * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset,
+ DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8.
+
2009-09-17 Roland McGrath <roland@redhat.com>
* dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP
diff --git a/libdw/libdw_form.c b/libdw/libdw_form.c
index ad78f4b4..219dd793 100644
--- a/libdw/libdw_form.c
+++ b/libdw/libdw_form.c
@@ -1,5 +1,5 @@
/* Helper functions for form handling.
- Copyright (C) 2003, 2004, 2006, 2007 Red Hat, Inc.
+ Copyright (C) 2003-2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -78,6 +78,7 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, unsigned int form,
break;
case DW_FORM_strp:
+ case DW_FORM_sec_offset:
result = cu->offset_size;
break;
@@ -94,11 +95,16 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, unsigned int form,
break;
case DW_FORM_block:
+ case DW_FORM_exprloc:
saved = valp;
get_uleb128 (u128, valp);
result = u128 + (valp - saved);
break;
+ case DW_FORM_flag_present:
+ result = 0;
+ break;
+
case DW_FORM_ref1:
case DW_FORM_data1:
case DW_FORM_flag:
@@ -117,6 +123,7 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, unsigned int form,
case DW_FORM_data8:
case DW_FORM_ref8:
+ case DW_FORM_ref_sig8:
result = 8;
break;