dwarf_init.c (179187) | dwarf_init.c (221569) |
---|---|
1/*- 2 * Copyright (c) 2007 John Birrell (jb@freebsd.org) 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2007 John Birrell (jb@freebsd.org) 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/lib/libdwarf/dwarf_init.c 179187 2008-05-22 02:14:23Z jb $ | 26 * $FreeBSD: head/lib/libdwarf/dwarf_init.c 221569 2011-05-07 01:05:31Z obrien $ |
27 */ 28 29#include <stdlib.h> 30#include <string.h> 31#include "_libdwarf.h" 32 33static const char *debug_snames[DWARF_DEBUG_SNAMES] = { 34 ".debug_abbrev", --- 538 unchanged lines hidden (view full) --- 573 574 if (a->a_children == DW_CHILDREN_yes) 575 level++; 576 } 577 578 offset = next_offset; 579 } 580 | 27 */ 28 29#include <stdlib.h> 30#include <string.h> 31#include "_libdwarf.h" 32 33static const char *debug_snames[DWARF_DEBUG_SNAMES] = { 34 ".debug_abbrev", --- 538 unchanged lines hidden (view full) --- 573 574 if (a->a_children == DW_CHILDREN_yes) 575 level++; 576 } 577 578 offset = next_offset; 579 } 580 |
581 /* Build the function table. */ 582 dwarf_build_function_table(dbg); 583 |
|
581 return ret; 582} 583 584static int 585dwarf_elf_read(Dwarf_Debug dbg, Dwarf_Error *error) 586{ 587 GElf_Shdr shdr; 588 Elf_Scn *scn = NULL; --- 92 unchanged lines hidden (view full) --- 681 DWARF_SET_ERROR(error, DWARF_E_MEMORY); 682 ret = DWARF_E_MEMORY; 683 } else { 684 dbg->dbg_elf = elf; 685 dbg->dbg_elf_close = 0; 686 dbg->dbg_mode = mode; 687 688 STAILQ_INIT(&dbg->dbg_cu); | 584 return ret; 585} 586 587static int 588dwarf_elf_read(Dwarf_Debug dbg, Dwarf_Error *error) 589{ 590 GElf_Shdr shdr; 591 Elf_Scn *scn = NULL; --- 92 unchanged lines hidden (view full) --- 684 DWARF_SET_ERROR(error, DWARF_E_MEMORY); 685 ret = DWARF_E_MEMORY; 686 } else { 687 dbg->dbg_elf = elf; 688 dbg->dbg_elf_close = 0; 689 dbg->dbg_mode = mode; 690 691 STAILQ_INIT(&dbg->dbg_cu); |
692 STAILQ_INIT(&dbg->dbg_func); |
|
689 690 *ret_dbg = dbg; 691 692 /* Read the ELF sections. */ 693 ret = dwarf_elf_read(dbg, error); 694 } 695 696 return ret; --- 52 unchanged lines hidden --- | 693 694 *ret_dbg = dbg; 695 696 /* Read the ELF sections. */ 697 ret = dwarf_elf_read(dbg, error); 698 } 699 700 return ret; --- 52 unchanged lines hidden --- |