public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] aarch64: Use aarch64_debug_printf in a few more places
Date: Tue, 27 Feb 2024 14:20:41 -0800	[thread overview]
Message-ID: <20240227222043.10218-1-jhb@FreeBSD.org> (raw)

No functional change
---
 gdb/arch/aarch64-insn.c | 51 +++++++++++++++--------------------------
 1 file changed, 19 insertions(+), 32 deletions(-)

diff --git a/gdb/arch/aarch64-insn.c b/gdb/arch/aarch64-insn.c
index 10818757cd4..3e40a51c443 100644
--- a/gdb/arch/aarch64-insn.c
+++ b/gdb/arch/aarch64-insn.c
@@ -98,13 +98,10 @@ aarch64_decode_b (CORE_ADDR addr, uint32_t insn, int *is_bl,
       *is_bl = (insn >> 31) & 0x1;
       *offset = sbits (insn, 0, 25) * 4;
 
-      if (aarch64_debug)
-	{
-	  debug_printf ("decode: 0x%s 0x%x %s 0x%s\n",
-			core_addr_to_string_nz (addr), insn,
-			*is_bl ? "bl" : "b",
-			core_addr_to_string_nz (addr + *offset));
-	}
+      aarch64_debug_printf ("decode: 0x%s 0x%x %s 0x%s\n",
+			    core_addr_to_string_nz (addr), insn,
+			    *is_bl ? "bl" : "b",
+			    core_addr_to_string_nz (addr + *offset));
 
       return 1;
     }
@@ -131,12 +128,9 @@ aarch64_decode_bcond (CORE_ADDR addr, uint32_t insn, unsigned *cond,
       *cond = (insn >> 0) & 0xf;
       *offset = sbits (insn, 5, 23) * 4;
 
-      if (aarch64_debug)
-	{
-	  debug_printf ("decode: 0x%s 0x%x b<%u> 0x%s\n",
-			core_addr_to_string_nz (addr), insn, *cond,
-			core_addr_to_string_nz (addr + *offset));
-	}
+      aarch64_debug_printf ("decode: 0x%s 0x%x b<%u> 0x%s\n",
+			    core_addr_to_string_nz (addr), insn, *cond,
+			    core_addr_to_string_nz (addr + *offset));
       return 1;
     }
   return 0;
@@ -166,13 +160,10 @@ aarch64_decode_cb (CORE_ADDR addr, uint32_t insn, int *is64, int *is_cbnz,
       *is_cbnz = (insn >> 24) & 0x1;
       *offset = sbits (insn, 5, 23) * 4;
 
-      if (aarch64_debug)
-	{
-	  debug_printf ("decode: 0x%s 0x%x %s 0x%s\n",
-			core_addr_to_string_nz (addr), insn,
-			*is_cbnz ? "cbnz" : "cbz",
-			core_addr_to_string_nz (addr + *offset));
-	}
+      aarch64_debug_printf ("decode: 0x%s 0x%x %s 0x%s\n",
+			    core_addr_to_string_nz (addr), insn,
+			    *is_cbnz ? "cbnz" : "cbz",
+			    core_addr_to_string_nz (addr + *offset));
       return 1;
     }
   return 0;
@@ -202,13 +193,10 @@ aarch64_decode_tb (CORE_ADDR addr, uint32_t insn, int *is_tbnz,
       *bit = ((insn >> (31 - 4)) & 0x20) | ((insn >> 19) & 0x1f);
       *imm = sbits (insn, 5, 18) * 4;
 
-      if (aarch64_debug)
-	{
-	  debug_printf ("decode: 0x%s 0x%x %s x%u, #%u, 0x%s\n",
-			core_addr_to_string_nz (addr), insn,
-			*is_tbnz ? "tbnz" : "tbz", *rt, *bit,
-			core_addr_to_string_nz (addr + *imm));
-	}
+      aarch64_debug_printf ("decode: 0x%s 0x%x %s x%u, #%u, 0x%s\n",
+			    core_addr_to_string_nz (addr), insn,
+			    *is_tbnz ? "tbnz" : "tbz", *rt, *bit,
+			    core_addr_to_string_nz (addr + *imm));
       return 1;
     }
   return 0;
@@ -247,11 +235,10 @@ aarch64_decode_ldr_literal (CORE_ADDR addr, uint32_t insn, int *is_w,
       *rt = (insn >> 0) & 0x1f;
       *offset = sbits (insn, 5, 23) * 4;
 
-      if (aarch64_debug)
-	debug_printf ("decode: %s 0x%x %s %s%u, #?\n",
-		      core_addr_to_string_nz (addr), insn,
-		      *is_w ? "ldrsw" : "ldr",
-		      *is64 ? "x" : "w", *rt);
+      aarch64_debug_printf ("decode: %s 0x%x %s %s%u, #?\n",
+			    core_addr_to_string_nz (addr), insn,
+			    *is_w ? "ldrsw" : "ldr",
+			    *is64 ? "x" : "w", *rt);
 
       return 1;
     }
-- 
2.42.0


             reply	other threads:[~2024-02-27 22:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 22:20 John Baldwin [this message]
2024-02-28  4:38 ` Simon Marchi

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=20240227222043.10218-1-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).