aarch64: Use aarch64_debug_printf in a few more places

No functional change

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
John Baldwin
2024-02-28 16:03:16 -08:00
parent d3da86d037
commit b081c003ff

View File

@@ -98,13 +98,10 @@ aarch64_decode_b (CORE_ADDR addr, uint32_t insn, int *is_bl,
*is_bl = (insn >> 31) & 0x1; *is_bl = (insn >> 31) & 0x1;
*offset = sbits (insn, 0, 25) * 4; *offset = sbits (insn, 0, 25) * 4;
if (aarch64_debug) aarch64_debug_printf ("decode: 0x%s 0x%x %s 0x%s",
{ core_addr_to_string_nz (addr), insn,
debug_printf ("decode: 0x%s 0x%x %s 0x%s\n", *is_bl ? "bl" : "b",
core_addr_to_string_nz (addr), insn, core_addr_to_string_nz (addr + *offset));
*is_bl ? "bl" : "b",
core_addr_to_string_nz (addr + *offset));
}
return 1; return 1;
} }
@@ -131,12 +128,9 @@ aarch64_decode_bcond (CORE_ADDR addr, uint32_t insn, unsigned *cond,
*cond = (insn >> 0) & 0xf; *cond = (insn >> 0) & 0xf;
*offset = sbits (insn, 5, 23) * 4; *offset = sbits (insn, 5, 23) * 4;
if (aarch64_debug) aarch64_debug_printf ("decode: 0x%s 0x%x b<%u> 0x%s",
{ core_addr_to_string_nz (addr), insn, *cond,
debug_printf ("decode: 0x%s 0x%x b<%u> 0x%s\n", core_addr_to_string_nz (addr + *offset));
core_addr_to_string_nz (addr), insn, *cond,
core_addr_to_string_nz (addr + *offset));
}
return 1; return 1;
} }
return 0; 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; *is_cbnz = (insn >> 24) & 0x1;
*offset = sbits (insn, 5, 23) * 4; *offset = sbits (insn, 5, 23) * 4;
if (aarch64_debug) aarch64_debug_printf ("decode: 0x%s 0x%x %s 0x%s",
{ core_addr_to_string_nz (addr), insn,
debug_printf ("decode: 0x%s 0x%x %s 0x%s\n", *is_cbnz ? "cbnz" : "cbz",
core_addr_to_string_nz (addr), insn, core_addr_to_string_nz (addr + *offset));
*is_cbnz ? "cbnz" : "cbz",
core_addr_to_string_nz (addr + *offset));
}
return 1; return 1;
} }
return 0; 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); *bit = ((insn >> (31 - 4)) & 0x20) | ((insn >> 19) & 0x1f);
*imm = sbits (insn, 5, 18) * 4; *imm = sbits (insn, 5, 18) * 4;
if (aarch64_debug) aarch64_debug_printf ("decode: 0x%s 0x%x %s x%u, #%u, 0x%s",
{ core_addr_to_string_nz (addr), insn,
debug_printf ("decode: 0x%s 0x%x %s x%u, #%u, 0x%s\n", *is_tbnz ? "tbnz" : "tbz", *rt, *bit,
core_addr_to_string_nz (addr), insn, core_addr_to_string_nz (addr + *imm));
*is_tbnz ? "tbnz" : "tbz", *rt, *bit,
core_addr_to_string_nz (addr + *imm));
}
return 1; return 1;
} }
return 0; return 0;
@@ -247,11 +235,10 @@ aarch64_decode_ldr_literal (CORE_ADDR addr, uint32_t insn, int *is_w,
*rt = (insn >> 0) & 0x1f; *rt = (insn >> 0) & 0x1f;
*offset = sbits (insn, 5, 23) * 4; *offset = sbits (insn, 5, 23) * 4;
if (aarch64_debug) aarch64_debug_printf ("decode: %s 0x%x %s %s%u, #?",
debug_printf ("decode: %s 0x%x %s %s%u, #?\n", core_addr_to_string_nz (addr), insn,
core_addr_to_string_nz (addr), insn, *is_w ? "ldrsw" : "ldr",
*is_w ? "ldrsw" : "ldr", *is64 ? "x" : "w", *rt);
*is64 ? "x" : "w", *rt);
return 1; return 1;
} }