From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5585124237775476439==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] readelf: Show set_loc argument as hexadecimal Date: Thu, 18 Feb 2016 14:51:32 +0100 Message-ID: <1455803492.9915.92.camel@redhat.com> In-Reply-To: 1455057325.7606.94.camel@redhat.com --===============5585124237775476439== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 we= ll 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, n= ot > > a uleb128 and it should not be adjusted by code_align, which is only us= ed > > 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 > + > + * 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 --===============5585124237775476439==--