| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
To make it possible to use eu-addr2line interactively through a pipe we
need to explicitly flush stdout after handling each line from stdin.
https://sourceware.org/bugzilla/show_bug.cgi?id=23173
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.
The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.
Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.
Signed-off-by: Joshua Watt <[email protected]>
|
| |
|
|
|
|
|
|
| |
Rename version.c so that the implementation is called after the header
and the header doesn't clash with the toplevel version.h. print_version
depends on argp and is only used in the tools.
Signed-off-by: Ulf Hermann <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fedorahosted used to be our home, but we are now hosted at sourceware.
Change the elfutils project home to http://elfutils.org/
Point hosted services (email, release, git, bug tracker and web pages)
to https://sourceware.org/elfutils/
Move design notes from README to NOTES.
Add URLs for home, releases, bugs, git and mailinglist to README.
Make the --version output of all tools the same by using a common
print_version function and update the publicly shown copyright holder
to the elfutils developers.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
GCC7 will have a new -Wimplicit-fallthrough warning. It did catch one
small buglet in elflint option procession. So it seems useful to enable
to make sure all swatch case fallthroughs are deliberate.
Add configure check to detect whether gcc support -Wimplicit-fallthrough
and enable it. Add fixes and explicit fallthrough comments where necessary.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
| |
Always free the scopes returned by dwarf_getscopes () when done.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
| |
If dwarf_getscopes_die () fails then scopes might not be reset and we
could cause a double free.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an option --pretty-print to eu-addr2line to show all information
on one line and all inlines on a line of their own. This mimics the same
option from binutils addr2line, but without the short option variant -p.
Since we already use -p to select the process.
Example output:
eu-addr2line --pretty-print -s -i -f -C -p$(pidof firefox) 0x00007f368c6f8915
mozilla::ReentrantMonitor::Wait(unsigned int) at ReentrantMonitor.h:92
(inlined by) mozilla::ReentrantMonitorAutoEnter::Wait(unsigned int) at ReentrantMonitor.h:190
A couple of tests were added to check the output matches that of
binutils addr2line.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
| |
Makes the -C, --demangle option visible and implements it (ignoring the
demangle style argument). Adds a new test with sample output.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
| |
Adds test cases with sample output.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
| |
We would sometimes interpret input addresses as decimal or octal.
That could be confusing and isn't what binutils addr2line does.
Be consistent and always treat input addresses as hex.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
| |
This makes it clear that -j, --section=NAME is about how input is treated,
not how the output is formatted.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
| |
mtrace is a GNU extension not supported by uClibc and it's believed to
not be really used. Drop mtrace() calls and #include <mcheck.h>.
Signed-off-by: Max Filippov <[email protected]>
|
| |
|
|
| |
Signed-off-by: Josh Stone <[email protected]>
|
| |
|
|
|
|
|
|
| |
The function which contains an inline might not be the immediate next
die scope. For instance, there may be a lexical scope in between.
Instead, iterate the remaining scopes until an appropriate tag is found.
Signed-off-by: Josh Stone <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
dwarf_getscopes returns the number of scope DIEs containing a PC address.
It returns -1 for errors or 0 if no scopes match PC. If dwarf_getscopes
returned 0, then scopes will not be allocated and handle_address might free
the uninitialized scopes pointer. Make sure it always has a defined value.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Show all source locations that caused inline expansion of subroutines
at the given address. This can easily be supported by using libdw
dwarf_getscopes_die which will give all nested inlined subroutines.
When -f, --functions is given also show the function names where the
subroutines were inlined.
The output matches that of binutils addr2line --inlines.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
getline can return strings with a newline as last character when reading
from stdin. This could cause confusing symbol lookup failures like:
addr2line: cannot find symbol 'foo
'
So if the last character of the buf returned by getline is a newline just
null-terminate it right there. Also add a new testcase run-addr2line-test.sh.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
| |
Make sure addr2line and libdwfl don't leak memory.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change name from "Red Hat elfutils" to "elfutils".
* Update license of standalone tools and test from GPLv2 to GPLv3+.
* Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+.
* Add Developer Certificate of Origin based contributor policy.
top-level:
- COPYING: Upgraded from GPLv2 to GPLv3.
- CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files.
- NEWS: Added note about new contribution and license policy.
- Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST.
- configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'.
backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf:
- All files updated to GPLv2/LGPLv3+. Except some very small files
(<5 lines) which didn't have any headers at all before, the linker
.maps files and the libcpu/defs files which only contain data and
libelf/elf.h which comes from glibc and is under LGPLv2+.
config:
- elfutils.spec.in: Add new License: headers and new %doc files.
- Update all license headers to GPLv2/LGPLv3+ for files used by libs.
src, tests:
- All files updated to GPLv3+. Except for the test bz2 data files, the
linker maps and script files and some very small files (<5 lines)
that don't have any headers.
Signed-off-by: Richard Fontana <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
in all programs into the .rodata section.
|
| | |
|
| |
|
|
|
|
| |
(find_symbol): Likewise.
Convert plain number, or handle strings like "(section)+offset"
or "symbol+offset".
|
| |
|
|
|
|
| |
d15b4eb794e81e477f9896fe82a74cb5ecf4514c)
to branch 'com.redhat.elfutils' (head eaacbf01f8cc89d043ec6eca9b5e35cb5c4cde06)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* readelf.c (print_string_sections): New variable.
(options, parse_opt): Handle --strings/-p to set it.
(print_strings): New function.
(process_elf_file): Call it under -p.
* readelf.c (options): Add hidden aliases --segments, --sections,
as taken by binutils readelf.
|
| |
|
|
|
|
| |
Minor fixes.
Update gettext files to 0.16.1.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-05-18 Roland McGrath <[email protected]>
* unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
stripped file, so as not to duplicate a section copied in both.
* strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.
tests/
2007-05-18 Roland McGrath <[email protected]>
* run-strip-test4.sh (stripped, debugfile): Use new reference files.
* testfile37.bz2: New data file.
* testfile37.debug.bz2: New data file.
* run-unstrip-test2.sh: New file.
* Makefile.am (TESTS, EXTRA_DIST): Add them.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
e5cfdd13aa39dfae16b905fd57ff56ad8a131bb5)
to branch 'com.redhat.elfutils' (head 60222fc1981540f15e674b6705fd7a6f628f95a4)
|
| |
|
|
|
|
| |
1ac619debea0e3ecfd2704e8bdc803c6c893b62a)
to branch 'com.redhat.elfutils' (head 830d38d0a2ce24911160a871963f093209e69d9e)
|
| |
|
|
| |
and fde883376d5d9573d47686c91400d14495518411
|
| |
|
|
|
|
|
|
|
|
|
| |
for PLT entries if there is no local definition.
* ld.c (parse_option): Handle -z ignore like --as-needed and
-z record like --no-as-needed.
* ld.h (struct ld_state): Remove ignore_unused_dsos field.
* ldgeneric.c (new_generated_scn): Always compute ndt_needed by
looping over DSOs. When deciding about adding DT_NEEDED entries
use ->as_needed instead of ignore_unused_dsos.
|
| |
|
|
| |
and cb87c403367a928f441c3dab11f1ed989884a7f7
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
4f8fc821345feef58624f0aa5b470d4827577d8c)
to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2005-08-27 Roland McGrath <[email protected]>
* dwarf_getscopes.c (dwarf_getscopes): Rewritten using
__libdw_visit_scopes.
* dwarf_getscopes_die.c: New file.
* Makefile.am (libdw_a_SOURCES): Add it.
* libdw.h: Declare dwarf_getscopes_die.
* libdw.map: Bump to 0.115 and add it.
* libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct
containing a DIE and its parent pointer, instead of just Dwarf_Die.
Take two functions for both preorder and postorder visitors.
* libdwP.h: Update decl.
(struct Dwarf_Die_Chain): New type.
* dwarf_func_inline.c: Update uses.
* dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate.
Add INTDEF.
* libdwP.h: Add INTDECL.
* dwarf_func_name.c (dwarf_func_name): Use dwarf_diename.
src/
2005-08-27 Roland McGrath <[email protected]>
* addr2line.c (dwarf_diename_integrate): Function removed.
(print_dwarf_function): Use plain dwarf_diename.
tests/
2005-08-27 Roland McGrath <[email protected]>
* run-funcscopes.sh: New file.
* testfile25.bz2: New data file.
* Makefile.am (TESTS, EXTRA_DIST): Add them.
2005-08-26 Roland McGrath <[email protected]>
* addrscopes.c (dwarf_diename_integrate): Removed.
(print_vars, handle_address): Use plain dwarf_diename.
2005-08-25 Roland McGrath <[email protected]>
* funcscopes.c: New file.
* Makefile.am (noinst_PROGRAMS): Add it.
(funcscopes_LDADD): New variable.
* run-addrscopes.sh: Add another case.
* testfile24.bz2: New data file.
* Makefile.am (EXTRA_DIST): Add it.
* addrscopes.c (handle_address): Take new argument IGNORE_INLINES,
pass it to dwarf_getscopes.
(main): Pass it, true when '=' follows an address.
|
| |
|
|
| |
and b0183df71043735ade5c882809fed6c7ca571b2a
|
| | |
|
| |
|
|
| |
Minor strip cleanups.
|