aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOzkan Sezer <sezero@sourceware.org>2010-07-20 18:20:27 +0000
committerOzkan Sezer <sezero@sourceware.org>2010-07-20 18:20:27 +0000
commitc6f46ca0a460b20a1c2f321e0d3e73dd9715c603 (patch)
tree82d89d92c81b4b67d5103f86b58e96363dc8e14f
parent5c3216e2a7b107d7650aae0ab8955cb0b2c4b1ac (diff)
downloadgdb-c6f46ca0a460b20a1c2f321e0d3e73dd9715c603.zip
gdb-c6f46ca0a460b20a1c2f321e0d3e73dd9715c603.tar.gz
gdb-c6f46ca0a460b20a1c2f321e0d3e73dd9715c603.tar.bz2
* gdb/gdbserver/server.c (handle_query): strcpy() the returned string from
paddress() instead of sprintf().
-rw-r--r--gdb/gdbserver/ChangeLog2
-rw-r--r--gdb/gdbserver/server.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 1400a24..0d16be9 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,7 @@
2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
+ * server.c (handle_query): strcpy() the returned string from paddress()
+ instead of sprintf().
* utils.c (paddress): Return phex_nz().
2010-07-07 Joel Brobecker <brobecker@adacore.com>
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 9125f0e..29b6cdc 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1539,7 +1539,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
if (err == 0)
{
- sprintf (own_buf, "%llx", address);
+ strcpy (own_buf, paddress(address));
return;
}
else if (err > 0)
@@ -1563,7 +1563,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
n = (*the_target->get_tib_address) (ptid, &tlb);
if (n == 1)
{
- sprintf (own_buf, "%llx", tlb);
+ strcpy (own_buf, paddress(tlb));
return;
}
else if (n == 0)