On Tue, 2016-02-09 at 23:35 +0100, Mark Wielaard wrote: > On Sat, 2016-01-23 at 21:39 +0100, Mark Wielaard wrote: > > On Wed, Jan 20, 2016 at 03:14:16PM -0800, Roland McGrath wrote: > > > so that it displays the literal value (like the other cases do) as well as > > > the final value (which in this case is just with VMA_BASE added in). > > > > I agree with using %# for printing the address and setting the pc using > > vma_base and op1. But the argument of a DW_CFA_set_loc is an address, not > > a uleb128 and it should not be adjusted by code_align, which is only used > > for CFA_advance operations as far as I understand it. To read an address > > we need to know the FDE address encoding and use read_encoded (which > > isn't defined till a bit later, so we need to move it up). > > So, no comments about this at all? Sounds sane, sounds insane? > What if I attach a full patch and threaten to commit it?
OK, no comments... Then I am forced to execute my threat... Committed to master now: > +2016-02-09 Mark Wielaard <m...@redhat.com> > + > + * readelf.c (read_encoded): Move up. > + (print_cfa_program): Add encoding argument. Use it for read_encoded > + when reading DW_CFA_set_loc op. > + (print_debug_frame_section): Pass fde_encoding to print_cfa_program. Cheers, Mark