libdw/
2007-04-16 Roland McGrath <roland@redhat.com>
* libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
libdwfl/
2007-04-16 Roland McGrath <roland@redhat.com>
* derelocate.c (cache_sections): Apply bias to sh_addr.
(compare_secrefs): Fix address comparison to avoid signed overflow.
(find_section): New function, broken out of ...
(dwfl_module_relocate_address): ... here, call it.
(check_module): New function, broken out of ...
(dwfl_module_relocate_address): ... here, call it.
(dwfl_module_address_section): New function.
* libdwfl.h: Declare it.
tests/
2007-04-16 Roland McGrath <roland@redhat.com>
* dwfl-addr-sect.c: New file.
* Makefile.am (noinst_PROGRAMS): Add it.
(dwfl_addr_sect_LDADD): New variable.
diff --git a/libdw/libdw.h b/libdw/libdw.h
index d44f427..968e73a 100644
--- a/libdw/libdw.h
+++ b/libdw/libdw.h
@@ -1,5 +1,5 @@
/* Interfaces for libdw.
- Copyright (C) 2002, 2004, 2005, 2006 Red Hat, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006, 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
@@ -473,6 +473,14 @@
extern const char *dwarf_filesrc (Dwarf_Files *file, size_t idx,
Dwarf_Word *mtime, Dwarf_Word *length);
+/* Return the directory list used in the file information extracted.
+ (*RESULT)[0] is the CU's DW_AT_comp_dir value, and may be null.
+ (*RESULT)[0..*NDIRS-1] are the compile-time include directory path
+ encoded by the compiler. */
+extern int dwarf_getsrcdirs (Dwarf_Files *files,
+ const char *const **result, size_t *ndirs)
+ __nonnull_attribute__ (2, 3);
+
/* Return location expression, decoded as a list of operations. */
extern int dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **expr,