Re: [PATCH] libdw: handle DW_FORM_indirect when reading attributes

2021-05-06 Thread Mark Wielaard
Hi Omar, On Tue, May 04, 2021 at 02:18:45PM -0700, Omar Sandoval wrote: > On Sat, May 01, 2021 at 06:03:37PM +0200, Mark Wielaard wrote: > > On Sat, 2021-05-01 at 17:59 +0200, Mark Wielaard wrote: > > > There is __libdw_form_val_compute_len which already handles > > > DW_FORM_indirect: > > > > >

Re: [PATCH] libdw: handle DW_FORM_indirect when reading attributes

2021-05-04 Thread Omar Sandoval
On Sat, May 01, 2021 at 06:03:37PM +0200, Mark Wielaard wrote: > Hi, > > On Sat, 2021-05-01 at 17:59 +0200, Mark Wielaard wrote: > > There is __libdw_form_val_compute_len which already handles > > DW_FORM_indirect: > > > > case DW_FORM_indirect: > > get_uleb128 (u128, valp, endp); > >

Re: [PATCH] libdw: handle DW_FORM_indirect when reading attributes

2021-05-04 Thread Omar Sandoval
On Sat, May 01, 2021 at 05:59:31PM +0200, Mark Wielaard wrote: > Hi Omar, > > On Fri, 2021-04-23 at 16:36 -0700, Omar Sandoval wrote: > > Whenever we encounter an attribute with DW_FORM_indirect, we need to > > read its true form from the DIE data. Then, we can continue normally. > > This adds sup

Re: [PATCH] libdw: handle DW_FORM_indirect when reading attributes

2021-05-01 Thread Mark Wielaard
Hi, On Sat, 2021-05-01 at 17:59 +0200, Mark Wielaard wrote: > There is __libdw_form_val_compute_len which already handles > DW_FORM_indirect: > > case DW_FORM_indirect: > get_uleb128 (u128, valp, endp); > // XXX Is this really correct? > result = __libdw_form_val_len (cu, u1

Re: [PATCH] libdw: handle DW_FORM_indirect when reading attributes

2021-05-01 Thread Mark Wielaard
Hi Omar, On Fri, 2021-04-23 at 16:36 -0700, Omar Sandoval wrote: > Whenever we encounter an attribute with DW_FORM_indirect, we need to > read its true form from the DIE data. Then, we can continue normally. > This adds support to the most obvious places: __libdw_find_attr() and > dwarf_getattrs()

[PATCH] libdw: handle DW_FORM_indirect when reading attributes

2021-04-23 Thread Omar Sandoval
From: Omar Sandoval Whenever we encounter an attribute with DW_FORM_indirect, we need to read its true form from the DIE data. Then, we can continue normally. This adds support to the most obvious places: __libdw_find_attr() and dwarf_getattrs(). There may be more places that need to be updated.