From: Roland McGrath Date: Thu, 15 Oct 2009 19:26:49 +0000 (-0700) Subject: More grokage of DWARF4 forms. X-Git-Tag: elfutils-0.144~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ca7bc4cb83845372375398006ec04e3f7df1235;p=thirdparty%2Felfutils.git More grokage of DWARF4 forms. --- diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 2208f772d..33a18baf5 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 ad78f4b4f..219dd7931 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;