Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix build on sparc
Date: Sat, 26 Nov 2011 19:39:00 -0000	[thread overview]
Message-ID: <20111126.143855.1966723588620210024.davem@davemloft.net> (raw)


sprintf_vma() expands to a printf format string appropriate for
a bfd_vma type, so the only proper cast is to that exact type.

This fixes the build for me on sparc-*-linux*.

Ok to commit?

gdb/

2011-11-26  David S. Miller  <davem@davemloft.net>

	* remote.c (remote_get_tracepoint_status): Fix sprintf_vma() arg cast.

diff --git a/gdb/remote.c b/gdb/remote.c
index 8fa5c1a..18a3580 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10249,7 +10249,7 @@ remote_get_tracepoint_status (struct breakpoint *bp,
     {
       utp->hit_count = 0;
       utp->traceframe_usage = 0;
-      sprintf_vma (addrbuf, (long unsigned int) utp->addr);
+      sprintf_vma (addrbuf, (bfd_vma) utp->addr);
       sprintf (rs->buf, "qTP:%x:%s", utp->number, addrbuf);
       putpkt (rs->buf);
       reply = remote_get_noisy_reply (&target_buf, &target_buf_size);


             reply	other threads:[~2011-11-26 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-26 19:39 David Miller [this message]
2011-11-26 20:14 ` [PATCH] Fix build on sparc (remote.c/tracepoints) Joel Brobecker
2011-11-26 20:32   ` David Miller
2011-11-26 20:51   ` Joel Brobecker
2011-11-26 23:42     ` Stan Shebs
2011-11-27 17:44       ` Joel Brobecker
2011-11-26 20:48 ` [PATCH] Fix build on sparc Jan Kratochvil

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=20111126.143855.1966723588620210024.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gdb-patches@sourceware.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