[PATCH] readelf: Find skeleton units when inspecting split .dwo (--dwarf-skeleton).

2018-05-25 Thread Mark Wielaard
To get the right context (especially addresses) when looking at a .dwo file we really need the skeleton file. If we can find it (simply replace .dwo with .o) then use that to get to the split DWARF units so that libdw sets up all relevant information to resolve. Also adds a --dwarf-skeleton optio

Re: [PATCH] libdw: Support DW_OP_addrx/constx and split DWARF addrx/constx support.

2018-05-25 Thread Mark Wielaard
On Tue, 2018-05-22 at 13:10 +0200, Mark Wielaard wrote: > DW_OP_addrx/constx and GNU DebugFission DW_OP_GNU_addr/const_index take > as argument an index into the .debug_addr section for the associated CU. > This index gets resolved through dwarf_getlocation_attr. A new fake addr > CU is created per

Re: [PATCH] libdw: Handle all address FORMs for dwarf_highpc, handle errors better.

2018-05-25 Thread Mark Wielaard
On Tue, 2018-05-22 at 14:44 +0200, Mark Wielaard wrote: > dwarf_highpc can use any address FORM, not just DW_FORM_addr. Just try > whether the address can be resolved as address. Always set error when > attribute couldn't be found or resolved. When calculating the base > address for a CU don't try

[COMMITTED] __libdw_cu_addr_base: Cast offset to uintptr_t before returning as pointer.

2018-05-25 Thread Mark Wielaard
Fixes a GCC compile issue on the elfutils-debian-i686 buildbot builder: dwarf_getlocation_attr.c: In function ‘addr_valp’: dwarf_getlocation_attr.c:62:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] return (unsigned char *) offset; ^ cc1: a