This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: <dwarf>: iteration over attributes swallows the last one


> We do, that's the new end iterator condition.  offset==1 valp!=NULL is 
> valid iterator pointing to the last element.

But valp==NULL is never a valid non-end iterator.

> To test the fix, all that is necessary is to pick the first CU DIE and 
> iterate its attributes, and that's what the test does.  The goal is for 
> the test to remain valid as long as the tested condition holds. 
> dwarf-print output will change in all kinds of ways as we change the 
> library.  But I pushed another way of doing this that doesn't involve 
> duplicate code, and does involve sed, which is my favourite combination.

sed only gets points when it's third-order or better (sed producing sed
programs that produce sed programs).  ;-)

I'm not sure $srcdir/ works right with testrun for installcheck et al.
And we don't need more tiny wrapper scripts really.  I added --depth=1
to dwarf-print.


Thanks,
Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]