| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new function dwarf_peel_type. Some type annotations in DWARF are
specified by modifier tag type wrappers instead of attributes.
For type aliases (typedef) and qualifiers (const, volatile, restrict)
tags dwarf_peel_type follows the DW_AT_type attributes till it finds
a base, user-defined, reference or pointer type DIE.
Use this new function in the backends for return type DIEs (replacing
the existing dwarf_peel_type there) and in dwarf_aggregate_size so
it can provide the sizes for qualified types too. Add a new version
and testcase for the new dwarf_aggregate_size functionality.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Given a Dwarf_Die or Dwarf_Attribute it is often convenient to get at the
CU DIE and the CU header information. There is dwarf_diecu but that doesn't
provide all information from the header and it doesn't work for attributes.
Add a new dwarf_cu_die function that provides all information given a
Dwarf_CU, which both Dwarf_Die and Dwarf_Attribute reference.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In both systemtap and libabigail there is a need to get the actual Dwarf
underlying an Dwarf_Die or Dwarf_Attribute. Following a DIE reference
might end up in an alternate Dwarf since the addition of DWZ multifile
forms. Both Dwarf_Die and Dwarf_Attribute already contain a Dwarf_CU
handle. Add a function dwarf_cu_getdwarf to retrieve the underlying
Dwarf using the Dwarf_CU.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
glibc now supplies these (compatible) structs instead of including the
kernel's <asm/ptrace.h> header, so let's use them. Annoyingly this will
cause new elfutils to FTBFS on old glibc, and vice versa. So include a
new configure check for the new struct names and use the old ones if
they are not avilable.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Older versions of GNU binutils strip would drop some ELF header flags.
Causing the main ELF file and the separate .debug file to have mismatched
ELF header fields. Unfortunately some distros are still shipping such files.
eu-unstrip doesn't want to recombine such files. Add a more explicit
explanation which fields don't match and provide a --force, -F flag to
force combining such files anyway (producing a warning).
https://bugzilla.redhat.com/show_bug.cgi?id=698005
https://bugzilla.redhat.com/show_bug.cgi?id=806474
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
| |
New public header elfutils/libdwelf.h for low-level DWARF/ELF helper
functions. The new function dwelf_elf_gnu_debuglink returns the name and
crc as found in the .gnu_debuglink section of an ELF file.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The --enable-mudflap configure build has been broken for 2 years without
anybody apparently noticing. GCC 4.9 removed mudflap support. Before
release we now run make distcheck with valgrind support. Removal of the
mudflap configure option simplifies the build a little.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Using dwarf_getscopes_die we can get all scopes that make up the current
subprogram representing an address. Using the call_file/line/column
attributes we can also show the source locations of these "inlined" calls.
Includes a test that shows that when DWARF debuginfo is available all
inlined function call frames and their source location can be shown.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
| |
Includes test that shows -d matches the function name that corresponds to
the actual source line we report with -s for a frame address.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dwfl_getthread_frames is a convenience function for when the user is only
interested in one specific thread id of a process. It can be implemented by
a simple wrapper function that removes an extra callback layer just to
filter on thread id. But it also provides an optimized path to getting
access to just one particular Dwfl_Thread of the Dwfl process by providing
and (optional) new callback for the state provider. The pid_thread_callbacks
now provide an (optional) pid_getthread that doesn't need to travers all
threads anymore. Which is implemented for the linux-pid-attach provider.
stack now uses this to implement a new '-1' option that shows just one
specific thread of a process.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some arches like ppc64 use function descriptor values instead of function
addresses causing matching of names and addresses to fail when using
dwfl_module_getsym or dwfl_module_addrsym.
Add ebl hook to resolve any function descriptor values found in non-ET_REL
modules.
The new function dwfl_module_getsym_info doesn't adjust the symbol value
in any way, but returns the adjusted and/or resolved address associated
with the symbol separately. The new function dwfl_module_addrinfo resolves
against both the address associated with the symbol (which could be the
function entry address) value and the adjusted st_value. So that it is
easy to resolve and match either function descriptors and/or function
entry addresses.
Since these new functions also return more information they replace the
dwfl_module_getsym_elf and dwfl_module_addrsym_elf functions that never
made it into a released elfutils version.
addr2line and readelf now use the new functions when looking up functions
names. addr2line will now also display the section the address was found
in when given -x.
Extra testcases were added for both addr2line and the dwflsyms testscase.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
New function that provides the index after the last non-local symbol as
returned by dwfl_module_getsym and dwfl_module_getsym_info. Allows users to
first search through all global symbols before searching the local symbols
in the table like dwfl_module_addrsym and dwfl_module_addrsym_info do as
optimization.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Josh Stone <jistone@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
| |
Sometimes with cross-compile toolchains, the tools are prefixed with the
target arch. Using AC_CHECK_TOOL looks for tools named like this.
Signed-off-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
./
2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* NEWS (Version 0.158): New.
libdw/
2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* libdw.map (ELFUTILS_0.158): New.
libdwfl/
2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* argp-std.c (parse_opt): Use executable parameter of
dwfl_core_file_report.
* core-file.c (dwfl_core_file_report): Add parameter executable. Set
it to DWFL. Add NEW_VERSION for it.
(_compat_without_executable_dwfl_core_file_report): New. Twice.
* libdwfl.h (dwfl_core_file_report): Add parameter executable, update
the function comment.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libdwfl/
* dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr.
Set it to true for ET_EXEC and ET_CORE. Provide alternative
setup of START and BIAS if !ADD_P_VADDR. Set END from BIAS, not BASE.
(dwfl_report_elf): Add parameter add_p_vaddr. Pass it down. Add
NEW_VERSION.
(_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with
COMPAT_VERSION.
* libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr. Describe it.
* libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr.
* link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf.
* linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for
dwfl_report_elf.
* offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf.
tests/
* dwfl-report-elf-align.c: Use false add_p_vaddr for dwfl_report_elf.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parallel-tests option was introduced in automake 1.11 and is the
default since automake 1.13. All tests can now be ran in parallel with
make check -j. To enable this all tests are ran in their own temporary
directory so they don't stomp on each others input or output files.
On my machine (4 cores) make check takes ~20 seconds, but now with
make check -j8 takes only ~4 seconds.
ChangeLog:
* configure.ac (AM_INIT_AUTOMAKE): Request parallel-tests.
tests/ChangeLog:
* Makefile.am (installed_TESTS_ENVIRONMENT): Export environment,
remove wrapper.
(TESTS_ENVIRONMENT): Likewise.
(installed_LOG_COMPILER): New variable defining wrapper.
(LOG_COMPILER): Likewise.
* run-*.sh: Fixup location of input and output files.
* test-subr.sh: Create test_dir, pushd to execute test in.
(trap): Remove test_dir.
(testfiles): Use abs_srcdir.
(installed_testrun): Match on abs_builddir or abs_top_builddir.
(self_test_files): Adjust path.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
| |
autoreconf will install config/test-driver, ignore it.
Update gettext m4 and po files to version 0.18.2.
Use AM_CPPFLAGS instead of INCLUDES.
All changes are backward compatible with Automake 1.11.
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
By default the dwz multi file support is not included. This means any
DW_FORM_GNU_ref_alt or DW_FORM_GNU_strp_alt encountered in libdw will
just produce an error message. A new configure option --enable-dwz is
needed to include it for those we wish to test it. The dwz test is also
disabled by default.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
| |
Reported-by: Nick Alcock <nix@esperi.org.uk>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
| |
|
| |
|
|
|
|
| |
and ranlib.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|