public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@hack.frob.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: [PATCH] readelf: Show set_loc argument as hexadecimal
Date: Wed, 20 Jan 2016 15:14:16 -0800	[thread overview]
Message-ID: <20160120231416.850642C3B71@topped-with-meat.com> (raw)
In-Reply-To: 565601A0.8060806@redhat.com

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

> Other addresses in this code are printed with ("%#" PRIx64).
> (AFAIK '#' here will always give "0x", but lets keep it consistent).

%#x prints "0" for zero (not "0x0").  Indeed it is the right thing to use here.

> It's also curious that nothing is done with op1 after printing it.
> Shouldn't this set pc, at least?

I think it should, but that is unrelated to this change.
Arguably, it should be:

	  get_uleb128 (op1, readp, endp);
	  op1 *= code_align;
	  printf ("     set_loc %#" PRIx64 " to %#" PRIx64 "\n",
		  op1, pc = vma_base + op1);

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).

             reply	other threads:[~2016-01-20 23:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 23:14 Roland McGrath [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-18 13:51 Mark Wielaard
2016-02-09 22:35 Mark Wielaard
2016-01-23 20:39 Mark Wielaard
2015-11-25 18:44 Josh Stone
2015-11-25 16:31 Ben Gamari
2015-11-25 16:30 Ben Gamari
2015-11-25 16:23 Ben Gamari
2015-11-25 16:22 Ben Gamari
2015-11-25 16:21 Ben Gamari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160120231416.850642C3B71@topped-with-meat.com \
    --to=roland@hack.frob.com \
    --cc=elfutils-devel@lists.fedorahosted.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).