From 9ca7bc4cb83845372375398006ec04e3f7df1235 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Oct 2009 12:26:49 -0700 Subject: More grokage of DWARF4 forms. --- libdw/ChangeLog | 5 +++++ libdw/libdw_form.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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 + + * 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 * 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 , 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; -- cgit v1.2.3