aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-11-27 17:39:30 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-11-27 17:39:30 +0000
commit2bf50f6ff30b7eee9f5d524093440e4a6f197049 (patch)
treea9598bab221ca18c4d99a46d63a1a721d5024297
parent744ab88c495eb1ab30b18480aa199f53ab70ff89 (diff)
downloadgdb-2bf50f6ff30b7eee9f5d524093440e4a6f197049.zip
gdb-2bf50f6ff30b7eee9f5d524093440e4a6f197049.tar.gz
gdb-2bf50f6ff30b7eee9f5d524093440e4a6f197049.tar.bz2
remove use of sprintf_vma in remote_get_tracepoint_status
This function takes a VMA and was forcing us to perform a cast to compile without warning on one platform. Except that the cast caused a warning on sparc-solaris. This patch fixes the problem by using phex_nz instead. gdb/ChangeLog: * remote.c (remote_get_tracepoint_status): Delete addrbuf local variable. Avoid use of sprintf_vma.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6fe2a5c..d6551d6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-27 Joel Brobecker <brobecker@acacore.com>
+
+ * remote.c (remote_get_tracepoint_status): Delete addrbuf
+ local variable. Avoid use of sprintf_vma.
+
2011-11-27 Sanjoy Das <sdas@igalia.com>
Fix regression in jit.exp.
diff --git a/gdb/remote.c b/gdb/remote.c
index 8fa5c1a..6e37f69 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10219,7 +10219,6 @@ remote_get_tracepoint_status (struct breakpoint *bp,
struct uploaded_tp *utp)
{
struct remote_state *rs = get_remote_state ();
- char addrbuf[40];
char *reply;
struct bp_location *loc;
struct tracepoint *tp = (struct tracepoint *) bp;
@@ -10234,8 +10233,8 @@ remote_get_tracepoint_status (struct breakpoint *bp,
any status. */
if (tp->number_on_target == 0)
continue;
- sprintf_vma (addrbuf, loc->address);
- sprintf (rs->buf, "qTP:%x:%s", tp->number_on_target, addrbuf);
+ sprintf (rs->buf, "qTP:%x:%s", tp->number_on_target,
+ phex_nz (loc->address, 0));
putpkt (rs->buf);
reply = remote_get_noisy_reply (&target_buf, &target_buf_size);
if (reply && *reply)
@@ -10249,8 +10248,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 (rs->buf, "qTP:%x:%s", utp->number, addrbuf);
+ sprintf (rs->buf, "qTP:%x:%s", utp->number, phex_nz (utp->addr, 0));
putpkt (rs->buf);
reply = remote_get_noisy_reply (&target_buf, &target_buf_size);
if (reply && *reply)