diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:46:15 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch) | |
tree | 641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/nios2-tdep.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.bz2 |
Unify gdb printf functions
Now that filtered and unfiltered output can be treated identically, we
can unify the printf family of functions. This is done under the name
"gdb_printf". Most of this patch was written by script.
Diffstat (limited to 'gdb/nios2-tdep.c')
-rw-r--r-- | gdb/nios2-tdep.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c index 857c60d..159d31b 100644 --- a/gdb/nios2-tdep.c +++ b/gdb/nios2-tdep.c @@ -1222,10 +1222,10 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, int innermost = (this_frame ? (frame_relative_level (this_frame) == 0) : 1); if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, - "{ nios2_analyze_prologue start=%s, current=%s ", - paddress (gdbarch, start_pc), - paddress (gdbarch, current_pc)); + gdb_printf (gdb_stdlog, + "{ nios2_analyze_prologue start=%s, current=%s ", + paddress (gdbarch, start_pc), + paddress (gdbarch, current_pc)); /* Set up the default values of the registers. */ nios2_setup_default (cache); @@ -1252,7 +1252,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, memcpy (temp_value, value, sizeof (temp_value)); value = temp_value; if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "*"); + gdb_printf (gdb_stdlog, "*"); } op = nios2_fetch_insn (gdbarch, pc, &insn); @@ -1265,9 +1265,9 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, if (nios2_debug) { if (op->size == 2) - fprintf_unfiltered (gdb_stdlog, "[%04X]", insn & 0xffff); + gdb_printf (gdb_stdlog, "[%04X]", insn & 0xffff); else - fprintf_unfiltered (gdb_stdlog, "[%08X]", insn); + gdb_printf (gdb_stdlog, "[%08X]", insn); } /* The following instructions can appear in the prologue. */ @@ -1554,7 +1554,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, cache->return_regnum = NIOS2_EA_REGNUM; if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "\n-> retreg=%d, ", cache->return_regnum); + gdb_printf (gdb_stdlog, "\n-> retreg=%d, ", cache->return_regnum); if (cache->reg_value[NIOS2_FP_REGNUM].reg == NIOS2_SP_REGNUM) /* If the FP now holds an offset from the CFA then this is a @@ -1571,7 +1571,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, /* Somehow the stack pointer has been corrupted. We can't return. */ if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "<can't reach cfa> }\n"); + gdb_printf (gdb_stdlog, "<can't reach cfa> }\n"); return 0; } @@ -1598,7 +1598,7 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, if (ra == current_pc) { if (nios2_debug) - fprintf_unfiltered + gdb_printf (gdb_stdlog, "<noreturn ADJUST %s, r31@r%d+?>, r%d@r%d+?> }\n", paddress (gdbarch, cache->reg_value[base_reg].offset), @@ -1660,8 +1660,8 @@ nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, } if (nios2_debug) - fprintf_unfiltered (gdb_stdlog, "cfa=%s }\n", - paddress (gdbarch, cache->cfa)); + gdb_printf (gdb_stdlog, "cfa=%s }\n", + paddress (gdbarch, cache->cfa)); return prologue_end; } |