public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] aarch64: Use aarch64_debug_printf in a few more places
@ 2024-02-29  0:03 John Baldwin
  0 siblings, 0 replies; only message in thread
From: John Baldwin @ 2024-02-29  0:03 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b081c003ff88bc14f238f53a12e7c3fb26f0cd35

commit b081c003ff88bc14f238f53a12e7c3fb26f0cd35
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Wed Feb 28 16:03:16 2024 -0800

    aarch64: Use aarch64_debug_printf in a few more places
    
    No functional change
    
    Approved-By: Simon Marchi <simon.marchi@efficios.com>

Diff:
---
 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..65a2841eef5 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",
+			    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",
+			    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",
+			    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",
+			    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, #?",
+			    core_addr_to_string_nz (addr), insn,
+			    *is_w ? "ldrsw" : "ldr",
+			    *is64 ? "x" : "w", *rt);
 
       return 1;
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-29  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29  0:03 [binutils-gdb] aarch64: Use aarch64_debug_printf in a few more places John Baldwin

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