+2020-03-12 Tom Tromey <tom@tromey.com>
+
+ * remote.c (remote_target::download_tracepoint)
+ (remote_target::enable_tracepoint)
+ (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
+ * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
+ sprintf_vma.
+
2020-03-12 Tom Tromey <tom@tromey.com>
* symfile-mem.c: Update CORE_ADDR size assert.
print_recreate_masked_watchpoint (struct breakpoint *b, struct ui_file *fp)
{
struct watchpoint *w = (struct watchpoint *) b;
- char tmp[40];
switch (b->type)
{
_("Invalid hardware watchpoint type."));
}
- sprintf_vma (tmp, w->hw_wp_mask);
- fprintf_unfiltered (fp, " %s mask 0x%s", w->exp_string, tmp);
+ fprintf_unfiltered (fp, " %s mask 0x%s", w->exp_string,
+ phex (w->hw_wp_mask, sizeof (CORE_ADDR)));
print_recreate_thread (b, fp);
}
encode_actions_rsp (loc, &tdp_actions, &stepping_actions);
tpaddr = loc->address;
- sprintf_vma (addrbuf, tpaddr);
+ strcpy (addrbuf, phex (tpaddr, sizeof (CORE_ADDR)));
ret = snprintf (buf.data (), buf.size (), "QTDP:%x:%s:%c:%lx:%x",
b->number, addrbuf, /* address */
(b->enable_state == bp_enabled ? 'E' : 'D'),
remote_target::enable_tracepoint (struct bp_location *location)
{
struct remote_state *rs = get_remote_state ();
- char addr_buf[40];
- sprintf_vma (addr_buf, location->address);
xsnprintf (rs->buf.data (), get_remote_packet_size (), "QTEnable:%x:%s",
- location->owner->number, addr_buf);
+ location->owner->number,
+ phex (location->address, sizeof (CORE_ADDR)));
putpkt (rs->buf);
remote_get_noisy_reply ();
if (rs->buf[0] == '\0')
remote_target::disable_tracepoint (struct bp_location *location)
{
struct remote_state *rs = get_remote_state ();
- char addr_buf[40];
- sprintf_vma (addr_buf, location->address);
xsnprintf (rs->buf.data (), get_remote_packet_size (), "QTDisable:%x:%s",
- location->owner->number, addr_buf);
+ location->owner->number,
+ phex (location->address, sizeof (CORE_ADDR)));
putpkt (rs->buf);
remote_get_noisy_reply ();
if (rs->buf[0] == '\0')