public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: Use aarch64_debug_printf in a few more places
@ 2024-02-27 22:20 John Baldwin
  2024-02-28  4:38 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: John Baldwin @ 2024-02-27 22:20 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-28  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 22:20 [PATCH] aarch64: Use aarch64_debug_printf in a few more places John Baldwin
2024-02-28  4:38 ` Simon Marchi

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).