[binutils-gdb] Use address style with throw_error

Tom Tromey via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e1145b1b9be0a5883154db237ec0021046557a08

commit e1145b1b9be0a5883154db237ec0021046557a08
Author: Tom Tromey <[email protected]>
Date:   Tue Apr 7 18:33:52 2026 -0600

    Use address style with throw_error
    
    This changes a call to throw_error to use address_style.

Diff:
---
 gdb/displaced-stepping.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gdb/displaced-stepping.c b/gdb/displaced-stepping.c
index 7d2ebf2b7d0..caff9aa99fa 100644
--- a/gdb/displaced-stepping.c
+++ b/gdb/displaced-stepping.c
@@ -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),
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.