diff options
| author | Mark Wielaard <[email protected]> | 2014-05-01 14:48:27 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2014-05-02 17:00:48 +0200 |
| commit | df85bf99021119fcbb2ced66dd69f1cceafb180c (patch) | |
| tree | a0ee033052e69b9b00e87ee31bf4962dac3cec17 /libdw | |
| parent | d81d32d2a4f92355e4c677b578147dfe819251b9 (diff) | |
libdwfl: Move dwz alt multi file searching to find_debuginfo callback.
Don't hard code the Dwarf dwz alt multi file search but allow the user
to override it through the standard Dwfl_Callbacks. Also move ownership
completely to the user of dwarf_setalt by removing free_alt from Dwarf
and adding alt, fd and elf fields to Dwfl_Module. Add a relative .dwz
file test case.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdw')
| -rw-r--r-- | libdw/ChangeLog | 6 | ||||
| -rw-r--r-- | libdw/dwarf_end.c | 6 | ||||
| -rw-r--r-- | libdw/dwarf_setalt.c | 3 | ||||
| -rw-r--r-- | libdw/libdwP.h | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 94ef03ca..960c8315 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,9 @@ +2014-05-01 Mark Wielaard <[email protected]> + + * libdwP.h (struct Dwarf): Remove free_alt. + * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf. + * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt. + 2014-04-30 Mark Wielaard <[email protected]> * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id. diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c index e65314ab..241a257a 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -1,5 +1,5 @@ /* Release debugging handling context. - Copyright (C) 2002-2011 Red Hat, Inc. + Copyright (C) 2002-2011, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -111,10 +111,6 @@ dwarf_end (dwarf) if (dwarf->free_elf) elf_end (dwarf->elf); - /* Free the alternative Dwarf descriptor if necessary. */ - if (dwarf->free_alt) - INTUSE (dwarf_end) (dwarf->alt_dwarf); - /* Free the context descriptor. */ free (dwarf); } diff --git a/libdw/dwarf_setalt.c b/libdw/dwarf_setalt.c index 3b5b9353..9bd566ff 100644 --- a/libdw/dwarf_setalt.c +++ b/libdw/dwarf_setalt.c @@ -35,9 +35,6 @@ void dwarf_setalt (Dwarf *main, Dwarf *alt) { - if (main->free_alt) - INTUSE (dwarf_end) (main->alt_dwarf); - main->free_alt = false; main->alt_dwarf = alt; } INTDEF (dwarf_setalt) diff --git a/libdw/libdwP.h b/libdw/libdwP.h index 1c947673..41361350 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -1,5 +1,5 @@ /* Internal definitions for libdwarf. - Copyright (C) 2002-2011, 2013 Red Hat, Inc. + Copyright (C) 2002-2011, 2013, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -147,9 +147,6 @@ struct Dwarf /* If true, we allocated the ELF descriptor ourselves. */ bool free_elf; - /* If true, we allocated the Dwarf descriptor for alt_dwarf ourselves. */ - bool free_alt; - /* Information for traversing the .debug_pubnames section. This is an array and separately allocated with malloc. */ struct pubnames_s |
