In print_debug_ranges_section and print_debug_loc_section we try to
get the associated CU through skip_listptr_hole for the first data data.
If no CU at all can be found (because the .debug_info section was bogus)
this would keep the Dwarf_CU uninitialized causing a crash later on
when it was compa
Some gcc omptimization levels (-Og in particular) didn't see that when
symtabndx != 0, then symtabshdr was certain to be initialized. Change
the symtabndx == 0 check to symtabshdr == NULL and initialize symtabshdr
to work around that.
Signed-off-by: Mark Wielaard
---
tests/ChangeLog | 11 +++
Currently storing a lot of Dwarf_Dies might be inefficient since it
costs a lot of memory since the sizeof (Dwarf_Die) == 32 bytes on 64bit
arches. You can try storing just the Dwarf_Off from dwarf_dieoffset.
Which is just 8 bytes. But then you have to keep track of whether to
call dwarf_dieoffset,
On Mon, 2018-01-22 at 12:30 +0100, Mark Wielaard wrote:
> +static void
> +find_debug_altlink (Dwarf *dbg)
> +{
> + const char *altname;
> + const void *build_id;
> + ssize_t build_id_len = INTUSE(dwelf_dwarf_gnu_debugaltlink) (dbg,
> > + &