diff options
author | Roland McGrath <[email protected]> | 2010-06-01 19:05:08 -0700 |
---|---|---|
committer | Roland McGrath <[email protected]> | 2010-06-01 19:05:08 -0700 |
commit | 5212396c006afcd7672d0a0f618ec5c28735e0da (patch) | |
tree | 067b7b93dc181739bc2a5d0a848b94696be00bd6 /libdw/dwarf_formudata.c | |
parent | 7fac1ce75275f8b48ce2ede108c1a645bf77f7cc (diff) |
Fix DW_FORM_sec_offset handling.
Diffstat (limited to 'libdw/dwarf_formudata.c')
-rw-r--r-- | libdw/dwarf_formudata.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libdw/dwarf_formudata.c b/libdw/dwarf_formudata.c index d9d0a1cd..63c9bcd7 100644 --- a/libdw/dwarf_formudata.c +++ b/libdw/dwarf_formudata.c @@ -1,5 +1,5 @@ /* Return unsigned constant represented by attribute. - Copyright (C) 2003-2009 Red Hat, Inc. + Copyright (C) 2003-2010 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 2003. @@ -79,21 +79,21 @@ __libdw_formptr (Dwarf_Attribute *attr, int sec_index, } else if (attr->cu->version > 3) goto invalid; - - switch (attr->form) - { - case DW_FORM_data4: - case DW_FORM_data8: - if (__libdw_read_offset (attr->cu->dbg, IDX_debug_info, attr->valp, - attr->form == DW_FORM_data4 ? 4 : 8, - &offset, sec_index, 0)) - return NULL; - break; - - default: - if (INTUSE(dwarf_formudata) (attr, &offset)) - return NULL; - }; + else + switch (attr->form) + { + case DW_FORM_data4: + case DW_FORM_data8: + if (__libdw_read_offset (attr->cu->dbg, IDX_debug_info, attr->valp, + attr->form == DW_FORM_data4 ? 4 : 8, + &offset, sec_index, 0)) + return NULL; + break; + + default: + if (INTUSE(dwarf_formudata) (attr, &offset)) + return NULL; + }; unsigned char *readp = d->d_buf + offset; unsigned char *endp = d->d_buf + d->d_size; |