This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[PATCH] Fix build on sparc


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


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