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.
This commit is contained in:
parent
a11ac3b3e8
commit
6cb06a8cda
249 changed files with 8449 additions and 8463 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue