]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use address style with throw_error
authorTom Tromey <tom@tromey.com>
Wed, 8 Apr 2026 00:33:52 +0000 (18:33 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 8 May 2026 19:02:32 +0000 (13:02 -0600)
This changes a call to throw_error to use address_style.

gdb/displaced-stepping.c

index 7d2ebf2b7d0e0e464df319414b302bcbbde9a5a1..caff9aa99fa5454e38f90cdc43dbe32425756bda 100644 (file)
@@ -20,6 +20,7 @@
 #include "displaced-stepping.h"
 
 #include "cli/cli-cmds.h"
+#include "cli/cli-style.h"
 #include "command.h"
 #include "gdbarch.h"
 #include "gdbcore.h"
@@ -115,9 +116,11 @@ displaced_step_buffers::prepare (thread_info *thread, CORE_ADDR &displaced_pc)
                                    buffer->saved_copy.data (), len);
   if (status != 0)
     throw_error (MEMORY_ERROR,
-                _("Error accessing memory address %s (%s) for "
+                _("Error accessing memory address %ps (%s) for "
                   "displaced-stepping scratch space."),
-                paddress (arch, buffer->addr), safe_strerror (status));
+                styled_string (address_style.style (),
+                               paddress (arch, buffer->addr)),
+                safe_strerror (status));
 
   displaced_debug_printf ("saved %s: %s",
                          paddress (arch, buffer->addr),