resolve conflicts, bump

This commit is contained in:
christos 2013-01-17 22:06:58 +00:00
parent 0e4a7fb1a7
commit d546d6fc48
15 changed files with 75 additions and 32 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: _libdwarf.h,v 1.2 2009/12/23 00:11:30 darran Exp $ */
/* $NetBSD: _libdwarf.h,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/_libdwarf.h,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/_libdwarf.h,v 1.3 2012/11/17 01:49:48 svnexp Exp $
*/
#ifndef __LIBDWARF_H_
@ -165,6 +165,37 @@ struct _Dwarf_Debug {
dbg_cu; /* List of compilation units. */
Dwarf_CU dbg_cu_current;
/* Ptr to the current compilation unit. */
STAILQ_HEAD(, _Dwarf_Func) dbg_func; /* List of functions */
};
struct _Dwarf_Func {
Dwarf_Die func_die;
const char *func_name;
Dwarf_Addr func_low_pc;
Dwarf_Addr func_high_pc;
int func_is_inlined;
/* inlined instance */
STAILQ_HEAD(, _Dwarf_Inlined_Func) func_inlined_instances;
STAILQ_ENTRY(_Dwarf_Func) func_next;
};
struct _Dwarf_Inlined_Func {
struct _Dwarf_Func *ifunc_origin;
Dwarf_Die ifunc_abstract;
Dwarf_Die ifunc_concrete;
Dwarf_Addr ifunc_low_pc;
Dwarf_Addr ifunc_high_pc;
STAILQ_ENTRY(_Dwarf_Inlined_Func) ifunc_next;
};
void dwarf_build_function_table(Dwarf_Debug dbg);
#ifdef DWARF_DEBUG
#include <assert.h>
#define DWARF_ASSERT(x) assert(x)
#else
#define DWARF_ASSERT(x)
#endif
#endif /* !__LIBDWARF_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_abbrev.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_abbrev.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_abbrev.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_abbrev.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_attr.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_attr.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_attr.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_attr.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_attrval.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_attrval.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_attrval.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_attrval.c,v 1.3 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H
@ -107,6 +107,7 @@ dwarf_attrval_flag(Dwarf_Die die, uint64_t attr, Dwarf_Bool *valp, Dwarf_Error *
} else {
switch (av->av_form) {
case DW_FORM_flag:
case DW_FORM_flag_present:
*valp = (Dwarf_Bool) av->u[0].u64;
break;
default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_cu.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_cu.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_cu.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_cu.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_dealloc.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_dealloc.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_dealloc.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_dealloc.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_die.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_die.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_die.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_die.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_dump.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_dump.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_dump.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_dump.c,v 1.3 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H
@ -246,6 +246,8 @@ get_form_desc(uint32_t form)
return "DW_FORM_data8";
case DW_FORM_flag:
return "DW_FORM_flag";
case DW_FORM_flag_present:
return "DW_FORM_flag_present";
case DW_FORM_indirect:
return "DW_FORM_indirect";
case DW_FORM_ref1:
@ -654,6 +656,7 @@ dwarf_dump_av(Dwarf_Die die, Dwarf_AttrValue av)
case DW_FORM_data4:
case DW_FORM_data8:
case DW_FORM_flag:
case DW_FORM_flag_present:
printf("%llu", (unsigned long long) av->u[0].u64);
break;
case DW_FORM_ref1:

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_errmsg.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_errmsg.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_errmsg.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_errmsg.c,v 1.3 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H
@ -35,7 +35,7 @@
#include <stdio.h>
#include "_libdwarf.h"
const char *_libdwarf_errors[] = {
static const char *_libdwarf_errors[] = {
#define DEFINE_ERROR(N,S) [DWARF_E_##N] = S
DEFINE_ERROR(NONE, "No Error"),
DEFINE_ERROR(ERROR, "An error"),

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_errno.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_errno.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_errno.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_errno.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_finish.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_finish.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_finish.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_finish.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_form.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_form.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_form.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_form.c,v 1.2 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_init.c,v 1.3 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_init.c,v 1.4 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_init.c,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_init.c,v 1.5 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H
@ -402,6 +402,10 @@ dwarf_init_attr(Dwarf_Debug dbg, Elf_Data **dp, uint64_t *offsetp,
avref.u[1].s = elf_strptr(dbg->dbg_elf,
dbg->dbg_s[DWARF_debug_str].s_shnum, avref.u[0].u64);
break;
case DW_FORM_flag_present:
/* This form has no value encoded in the DIE. */
avref.u[0].u64 = 1;
break;
default:
DWARF_SET_ERROR(error, DWARF_E_NOT_IMPLEMENTED);
ret = DWARF_E_NOT_IMPLEMENTED;
@ -553,7 +557,7 @@ dwarf_init_info(Dwarf_Debug dbg, Dwarf_Error *error)
Dwarf_Attribute at;
Dwarf_Die die;
uint64_t abnum;
uint64_t die_offset = offset;;
uint64_t die_offset = offset;
abnum = dwarf_read_uleb128(&d, &offset);
@ -584,6 +588,9 @@ dwarf_init_info(Dwarf_Debug dbg, Dwarf_Error *error)
offset = next_offset;
}
/* Build the function table. */
dwarf_build_function_table(dbg);
return ret;
}
@ -692,6 +699,7 @@ dwarf_elf_init(Elf *elf, int mode, Dwarf_Debug *ret_dbg, Dwarf_Error *error)
dbg->dbg_mode = mode;
STAILQ_INIT(&dbg->dbg_cu);
STAILQ_INIT(&dbg->dbg_func);
*ret_dbg = dbg;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwarf_loc.c,v 1.2 2010/02/22 11:01:29 darran Exp $ */
/* $NetBSD: dwarf_loc.c,v 1.3 2013/01/17 22:06:58 christos Exp $ */
/*-
* Copyright (c) 2007 John Birrell (jb@freebsd.org)
@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libdwarf/dwarf_loc.c,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $
* $FreeBSD: src/lib/libdwarf/dwarf_loc.c,v 1.3 2012/11/17 01:49:48 svnexp Exp $
*/
#if HAVE_NBTOOL_CONFIG_H

View File

@ -1,6 +1,6 @@
# $NetBSD: shlib_version,v 1.1 2009/12/23 00:10:15 darran Exp $
# $NetBSD: shlib_version,v 1.2 2013/01/17 22:06:58 christos Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0
minor=1