summaryrefslogtreecommitdiff
path: root/libdw
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-01-05 22:53:31 -0800
committerRoland McGrath <roland@redhat.com>2010-01-05 22:53:31 -0800
commitebc5c885e696cdc4961916113c50e1396d8d3d48 (patch)
tree787dc56229213ea4447b1b9da43781897551366f /libdw
parent0cb19833d376461a3c25fb2831a18908c933a322 (diff)
downloadelfutils-ebc5c885e696cdc4961916113c50e1396d8d3d48.tar.gz
Add dwarf_aggregate_size helper function to libdw.
Diffstat (limited to 'libdw')
-rw-r--r--libdw/ChangeLog9
-rw-r--r--libdw/Makefile.am5
-rw-r--r--libdw/dwarf_srclang.c3
-rw-r--r--libdw/libdw.h9
-rw-r--r--libdw/libdw.map5
-rw-r--r--libdw/libdwP.h4
6 files changed, 29 insertions, 6 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index bbbebfe2..0afa8507 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,5 +1,14 @@
2010-01-05 Roland McGrath <roland@redhat.com>
+ * dwarf_aggregate_size.c: New file.
+ * Makefile.am (libdw_a_SOURCES): Add it.
+ * libdw.h: Declare it.
+ * libdwP.h: Add INTDECL.
+ * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size.
+
+ * dwarf_srclang.c: Add INTDEF.
+ * libdwP.h: Add INTDECL.
+
* dwarf.h: Add some more DW_AT_GNU_* types from gcc.
* dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index 4d041cf7..23896fa6 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to create Makefile.in
##
-## Copyright (C) 2002-2009 Red Hat, Inc.
+## Copyright (C) 2002-2010 Red Hat, Inc.
## This file is part of Red Hat elfutils.
##
## Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -88,7 +88,8 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
cie.c fde.c cfi.c frame-cache.c \
dwarf_frame_info.c dwarf_frame_cfa.c dwarf_frame_register.c \
dwarf_cfi_addrframe.c \
- dwarf_getcfi.c dwarf_getcfi_elf.c dwarf_cfi_end.c
+ dwarf_getcfi.c dwarf_getcfi_elf.c dwarf_cfi_end.c \
+ dwarf_aggregate_size.c
if MAINTAINER_MODE
BUILT_SOURCES = $(srcdir)/known-dwarf.h
diff --git a/libdw/dwarf_srclang.c b/libdw/dwarf_srclang.c
index f1ff954c..305ffcd0 100644
--- a/libdw/dwarf_srclang.c
+++ b/libdw/dwarf_srclang.c
@@ -1,5 +1,5 @@
/* Return source language attribute of DIE.
- Copyright (C) 2003, 2005, 2009 Red Hat, Inc.
+ Copyright (C) 2003-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -67,5 +67,6 @@ dwarf_srclang (die)
(die, DW_AT_language, &attr_mem),
&value) == 0 ? (int) value : -1;
}
+INTDEF (dwarf_srclang)
OLD_VERSION (dwarf_srclang, ELFUTILS_0.122)
NEW_VERSION (dwarf_srclang, ELFUTILS_0.143)
diff --git a/libdw/libdw.h b/libdw/libdw.h
index 7602e611..94320c7b 100644
--- a/libdw/libdw.h
+++ b/libdw/libdw.h
@@ -1,5 +1,5 @@
/* Interfaces for libdw.
- Copyright (C) 2002-2009 Red Hat, Inc.
+ Copyright (C) 2002-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -362,7 +362,7 @@ extern int dwarf_child (Dwarf_Die *die, Dwarf_Die *result)
Returns 1 if no sibling could be found and, if RESULT is not
the same as DIE, it sets RESULT->addr to the address of the
(non-sibling) DIE that follows this one, or NULL if this DIE
- was the last one in the cokmpilation unit. */
+ was the last one in the compilation unit. */
extern int dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result)
__nonnull_attribute__ (2);
@@ -632,6 +632,11 @@ extern int dwarf_getlocation_implicit_value (Dwarf_Attribute *attr,
__nonnull_attribute__ (2, 3);
+/* Compute the byte-size of a type DIE according to DWARF rules.
+ For most types, this is just DW_AT_byte_size.
+ For DW_TAG_array_type it can apply much more complex rules. */
+extern int dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size);
+
/* Return scope DIEs containing PC address.
Sets *SCOPES to a malloc'd array of Dwarf_Die structures,
diff --git a/libdw/libdw.map b/libdw/libdw.map
index b39db481..8eaeacd5 100644
--- a/libdw/libdw.map
+++ b/libdw/libdw.map
@@ -227,3 +227,8 @@ ELFUTILS_0.143 {
dwarf_srclang;
} ELFUTILS_0.142;
+
+ELFUTILS_0.144 {
+ global:
+ dwarf_aggregate_size;
+} ELFUTILS_0.143;
diff --git a/libdw/libdwP.h b/libdw/libdwP.h
index 0284580f..248a58d5 100644
--- a/libdw/libdwP.h
+++ b/libdw/libdwP.h
@@ -1,5 +1,5 @@
/* Internal definitions for libdwarf.
- Copyright (C) 2002-2009 Red Hat, Inc.
+ Copyright (C) 2002-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -595,6 +595,7 @@ unsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index,
/* Aliases to avoid PLTs. */
+INTDECL (dwarf_aggregate_size)
INTDECL (dwarf_attr)
INTDECL (dwarf_attr_integrate)
INTDECL (dwarf_begin_elf)
@@ -624,6 +625,7 @@ INTDECL (dwarf_nextcu)
INTDECL (dwarf_offdie)
INTDECL (dwarf_ranges)
INTDECL (dwarf_siblingof)
+INTDECL (dwarf_srclang)
INTDECL (dwarf_tag)
#endif /* libdwP.h */