Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 5/5] Use address style with throw_error
Date: Fri, 10 Apr 2026 16:59:45 -0600	[thread overview]
Message-ID: <20260410-unify-exceptions-v1-5-ea64dae971a8@tromey.com> (raw)
In-Reply-To: <20260410-unify-exceptions-v1-0-ea64dae971a8@tromey.com>

This changes a call to throw_error to use address_style.
---
 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),

-- 
2.49.0


  parent reply	other threads:[~2026-04-10 23:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 22:59 [PATCH 0/5] Allow throw_* functions to style message Tom Tromey
2026-04-10 22:59 ` [PATCH 1/5] Allow styling when using throw_* functions Tom Tromey
2026-04-10 22:59 ` [PATCH 2/5] Use file- and line-styling with throw_error Tom Tromey
2026-04-10 22:59 ` [PATCH 3/5] Use command style " Tom Tromey
2026-04-10 22:59 ` [PATCH 4/5] Use function " Tom Tromey
2026-04-10 22:59 ` Tom Tromey [this message]
2026-05-08 19:02 ` [PATCH 0/5] Allow throw_* functions to style message Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260410-unify-exceptions-v1-5-ea64dae971a8@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox