diff options
author | Tom Tromey <tom@tromey.com> | 2020-03-12 13:32:15 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-03-12 13:32:15 -0600 |
commit | 53807e9f3d83bc0f67b9b9471cc60fb37182e5ab (patch) | |
tree | b2e946a96a9a25df3b438fef2f3d2c7a7ef8b787 /gdb/breakpoint.c | |
parent | 64f251023bcbd068861d4cb83b4e925083e0ea35 (diff) | |
download | gdb-53807e9f3d83bc0f67b9b9471cc60fb37182e5ab.zip gdb-53807e9f3d83bc0f67b9b9471cc60fb37182e5ab.tar.gz gdb-53807e9f3d83bc0f67b9b9471cc60fb37182e5ab.tar.bz2 |
Don't use sprintf_vma for CORE_ADDR
A few spots in gdb use sprintf_vma to print a CORE_ADDR. This will
fail on a 32-bit build once CORE_ADDR is always a 64-bit type.
This patch replaces these calls with phex instead.
gdb/ChangeLog
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.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5a9352c..e490254 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10400,7 +10400,6 @@ static void print_recreate_masked_watchpoint (struct breakpoint *b, struct ui_file *fp) { struct watchpoint *w = (struct watchpoint *) b; - char tmp[40]; switch (b->type) { @@ -10418,8 +10417,8 @@ print_recreate_masked_watchpoint (struct breakpoint *b, struct ui_file *fp) _("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); } |