+2007-07-03 Roland McGrath <roland@redhat.com>
+
+ * libdw.h (__extern_inline): New macro.
+ [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it.
+
2007-04-16 Roland McGrath <roland@redhat.com>
* libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
# define __nonnull_attribute__(args...)
#endif
+#ifdef __GNUC_STDC_INLINE__
+# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
+#else
+# define __extern_inline extern __inline
+#endif
+
/* Mode for the session. */
typedef enum
/* Inline optimizations. */
#ifdef __OPTIMIZE__
/* Return attribute code of given attribute. */
-extern inline unsigned int
+__extern_inline unsigned int
dwarf_whatattr (Dwarf_Attribute *attr)
{
return attr == NULL ? 0 : attr->code;
}
/* Return attribute code of given attribute. */
-extern inline unsigned int
+__extern_inline unsigned int
dwarf_whatform (Dwarf_Attribute *attr)
{
return attr == NULL ? 0 : attr->form;
-2007-06-08 Roland McGrath <roland@frob.com>
+2007-07-16 Roland McGrath <roland@redhat.com>
+
+ * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
+ reviving an existing module.
+
+2007-06-08 Roland McGrath <roland@redhat.com>
* libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
m->next = *tailp;
m->gc = false;
*tailp = m;
+ ++dwfl->nmodules;
return m;
}
+2007-07-09 Roland McGrath <roland@redhat.com>
+
+ * eblobjnotetypename.c (ebl_object_note_type_name): Handle
+ NT_GNU_HWCAP, NT_GNU_BUILD_ID.
+
+ * eblobjnote.c (ebl_object_note): Handle NT_GNU_BUILD_ID.
+
2007-04-22 Roland McGrath <roland@redhat.com>
* eblcorenotetypename.c (ebl_core_note_type_name): Handle NT_PRXFPREG.
/* Print contents of object file note.
- Copyright (C) 2002 Red Hat, Inc.
+ Copyright (C) 2002, 2007 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
/* The machine specific function did not know this type. */
switch (type)
{
+ case NT_GNU_BUILD_ID:
+ if (strcmp (name, "GNU") == 0 && descsz > 0)
+ {
+ printf (gettext (" Build ID: "));
+ uint_fast32_t i;
+ for (i = 0; i < descsz - 1; ++i)
+ printf ("%02" PRIx8, (uint8_t) desc[i]);
+ printf ("%02" PRIx8 "\n", (uint8_t) desc[i]);
+ }
+ break;
+
case NT_VERSION:
if (strcmp (name, "GNU") == 0 && descsz >= 8)
{
/* Return note type name.
- Copyright (C) 2002 Red Hat, Inc.
+ Copyright (C) 2002, 2007 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
{
#define KNOWNSTYPE(name) [NT_##name] = #name
KNOWNSTYPE (VERSION),
+ KNOWNSTYPE (GNU_HWCAP),
+ KNOWNSTYPE (GNU_BUILD_ID),
};
/* Handle standard names. */
+2007-07-09 Roland McGrath <roland@redhat.com>
+
+ * elf.h: Update from glibc.
+
2007-04-22 Roland McGrath <roland@redhat.com>
* elf.h: Update from glibc.
#define NT_UTSNAME 15 /* Contains copy of utsname struct */
#define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */
#define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */
-#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct*/
-#define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct*/
+#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct */
+#define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct */
/* Legal values for the note segment descriptor types for object files. */
word 2: minor version of the ABI
word 3: subminor version of the ABI
*/
-#define ELF_NOTE_ABI 1
+#define NT_GNU_ABI_TAG 1
+#define ELF_NOTE_ABI NT_GNU_ABI_TAG /* Old name. */
-/* Known OSes. These value can appear in word 0 of an ELF_NOTE_ABI
- note section entry. */
+/* Known OSes. These values can appear in word 0 of an
+ NT_GNU_ABI_TAG note section entry. */
#define ELF_NOTE_OS_LINUX 0
#define ELF_NOTE_OS_GNU 1
#define ELF_NOTE_OS_SOLARIS2 2
#define ELF_NOTE_OS_FREEBSD 3
+/* Synthetic hwcap information. The descriptor begins with two words:
+ word 0: number of entries
+ word 1: bitmask of enabled entries
+ Then follow variable-length entries, one byte followed by a
+ '\0'-terminated hwcap name string. The byte gives the bit
+ number to test if enabled, (1U << bit) & bitmask. */
+#define NT_GNU_HWCAP 2
+
+/* Build ID bits as generated by ld --build-id.
+ The descriptor consists of any nonzero number of bytes. */
+#define NT_GNU_BUILD_ID 3
+
/* Move records. */
typedef struct
-2007-06-06 Roland McGrath <roland@frob.com>
+2007-07-16 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-report.c: New file.
+ * Makefile.am (noinst_PROGRAMS, TESTS): Add it.
+ (dwfl_bug_report_LDADD): New variable.
+
+2007-06-06 Roland McGrath <roland@redhat.com>
* run-unstrip-test.sh: Declare testfile.unstrip for removal.
* show-abbrev.c (main): Adjust for dwarf_getabbrev interface change.
-2005-04-04 Roland McGrath <roland@frob.com>
+2005-04-04 Roland McGrath <roland@redhat.com>
* line2addr.c (main): Initialize LINES and NLINES before calling
dwarf_getsrc_file, and free LINES afterwards.
show-abbrev hash newscn ecp dwflmodtest \
find-prologues funcretval allregs rdwrmmap \
dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
- dwfl-addr-sect
+ dwfl-addr-sect dwfl-bug-report
# get-ciefde
asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
asm-tst6 asm-tst7 asm-tst8 asm-tst9
run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
run-find-prologues.sh run-allregs.sh run-readelf-test1.sh \
run-native-test.sh run-bug1-test.sh \
- dwfl-bug-addr-overflow run-addrname-test.sh dwfl-bug-fd-leak \
+ dwfl-bug-addr-overflow run-addrname-test.sh \
+ dwfl-bug-fd-leak dwfl-bug-report \
run-dwfl-bug-offline-rel.sh
# run-show-ciefde.sh
dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
arls_LDADD = $(libelf) $(libmudflap)
dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
CLEANFILES = xxx *.gcno *.gcda *gconv
--- /dev/null
+/* Test program for dwfl_report_end bug.
+ Copyright (C) 2007 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#include <config.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#include <elfutils/libdwfl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+static const Dwfl_Callbacks callbacks =
+ {
+ .find_elf = dwfl_linux_proc_find_elf,
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ };
+
+int
+main (void)
+{
+ Dwfl *dwfl = dwfl_begin (&callbacks);
+
+ for (int i = 0; i < 5; ++i)
+ {
+ dwfl_report_begin (dwfl);
+ dwfl_report_module (dwfl, "module1", 0, 10);
+ dwfl_report_end (dwfl, NULL, NULL);
+ }
+
+ dwfl_end (dwfl);
+
+ return 0;
+}