[PATCH] libdw: Don't crash on invalid die in dwarf_dieoffset.

2018-05-31 Thread Mark Wielaard
Add explicit test in get-units-invalid for dwarf_cuoffset and dwarf_dieoffset. Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 4 libdw/dwarf_dieoffset.c | 2 +- tests/ChangeLog | 5 + tests/get-units-invalid.c | 14 +- 4 files changed, 23 inserti

[PATCH] tests: Run run-low_high_pc.sh testcase on split dwarf files.

2018-05-31 Thread Mark Wielaard
Test that the low high pc attributes can be properly resolved also in split dwarf setups. Signed-off-by: Mark Wielaard --- tests/ChangeLog | 9 + tests/low_high_pc.c | 28 ++-- tests/run-low_high_pc.sh | 15 +++ 3 files changed, 46 inser

Re: [PATCH] readelf: Fix regression with multiple files and implicit debug_info reading.

2018-05-31 Thread Mark Wielaard
On Tue, 2018-05-29 at 09:57 +0200, Mark Wielaard wrote: > Commit 314e9d7d "readelf: Handle .debug_info first if any other debug > section needs it" introduced a regression when handling multiple files. > The implicit and explicit printing of debuginfo weren't reset and so > the second file would no

[PATCH] tests: Split self_test_files into an exe, lib and obj list.

2018-05-31 Thread Mark Wielaard
Introduce testrun_on_self_exe and testrun_on_self_lib. Some tests cannot handle (unrelocated) ET_REL object files. run-get-units-split.sh and run-unit-info.sh only handle executables and shared libraries. This allows running the whole testsuite on an elfutils build done with CFLAGS="-gdwarf-4 -gspl

Re: [PATCH] readelf, libdw: Add GNU DebugFission .debug_loc support.

2018-05-31 Thread Mark Wielaard
On Tue, 2018-05-29 at 12:08 +0200, Mark Wielaard wrote: > GNU DebugFission .debug_loc location lists uses the .debug_loc section > in the split dwarf .dwo file. The encoding is a mix of old style DWARF > .debug_loc and new style .debug_loclists. Pushed to master.

Re: [PATCH] libdw: Handle split Dwarf Dies in dwarf_die_addr_die.

2018-05-31 Thread Mark Wielaard
On Wed, 2018-05-30 at 00:11 +0200, Mark Wielaard wrote: > On Tue, 2018-05-29 at 23:57 +0200, Mark Wielaard wrote: > > dwarf_die_addr_die can be used to turn an Dwarf_Die addr back into a > > full Dwarf_Die, just given the original Dwarf debug handle. This now > > also works for Dwarf_Dies which ori

Re: [PATCH] libdw: Don't crash on invalid die in dwarf_dieoffset.

2018-05-31 Thread Mark Wielaard
On Thu, May 31, 2018 at 01:02:44PM +0200, Mark Wielaard wrote: > Add explicit test in get-units-invalid for dwarf_cuoffset and > dwarf_dieoffset. And that test caught another bug on 32bit systems! > Dwarf_Off > dwarf_dieoffset (Dwarf_Die *die) > { > - return (die == NULL > + return ((die ==

[Bug tools/23247] Segfault in 0.171 RC1 release candidate

2018-05-31 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23247 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

Re: [PATCH] readelf: Use correct listptr when looking up next loc for locview attr.

2018-05-31 Thread Mark Wielaard
On Wed, May 30, 2018 at 12:04:48PM +0200, Mark Wielaard wrote: > We were using loclistsptr instead of locsptr in print_debug_loc_section. > > https://sourceware.org/bugzilla/show_bug.cgi?id=23247 Pushed to master.

[Bug tools/23248] armv7l: dwarf_getsrclines.c:362:37: error: argument 1 value '4294967288' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]

2018-05-31 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23248 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

Re: [PATCH] libdw: Fix overflow warning on 32bit systems with GCC8 in dwarf_getsrclines.

2018-05-31 Thread Mark Wielaard
On Wed, May 30, 2018 at 03:54:52PM +0200, Mark Wielaard wrote: > ndirs is read from the debug data and should be size checked before use. > > https://sourceware.org/bugzilla/show_bug.cgi?id=23248 Pushed to master.

[PATCH] readelf: Deal with combined normal and split dwarf DebugFission .debug_loc.

2018-05-31 Thread Mark Wielaard
Normal and split dwarf from GNU DebugFission look the same, but should be treated competely separtely. When having a file with both skeletons and real compile units only note the secoffsets into the real .debug_loc in readelf. Otherwise or known_locslistptr will get confused. Add a testfile that c

[PATCH] readelf: Fix .debug_types printing with implicit section_info.

2018-05-31 Thread Mark Wielaard
Commit 314e9d7d "readelf: Handle .debug_info first if any other debug section needs it" disabled section_info printing if it was already handled. But section_types was an alias for section_info. So unless section_info was explicitly printed, .debug_types wasn't. Make section_types its own thing to