summaryrefslogtreecommitdiff
path: root/gdb/s12z-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/s12z-tdep.c')
-rw-r--r--gdb/s12z-tdep.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c
index 3f9740f0dfe..5394c1bbf5e 100644
--- a/gdb/s12z-tdep.c
+++ b/gdb/s12z-tdep.c
@@ -32,6 +32,7 @@
#include "remote.h"
#include "opcodes/s12z-opc.h"
#include "gdbarch.h"
+#include "disasm.h"
/* Two of the registers included in S12Z_N_REGISTERS are
the CCH and CCL "registers" which are just views into
@@ -140,19 +141,15 @@ s12z_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num)
/* Support functions for frame handling. */
-/* Copy of gdb_buffered_insn_length_fprintf from disasm.c. */
-static int ATTRIBUTE_PRINTF (2, 3)
-s12z_fprintf_disasm (void *stream, const char *format, ...)
-{
- return 0;
-}
+/* Return a disassemble_info initialized for s12z disassembly, however,
+ the disassembler will not actually print anything. */
static struct disassemble_info
s12z_disassemble_info (struct gdbarch *gdbarch)
{
struct disassemble_info di;
- init_disassemble_info (&di, &null_stream, s12z_fprintf_disasm);
+ init_disassemble_info_for_no_printing (&di);
di.arch = gdbarch_bfd_arch_info (gdbarch)->arch;
di.mach = gdbarch_bfd_arch_info (gdbarch)->mach;
di.endian = gdbarch_byte_order (gdbarch);
@@ -522,28 +519,28 @@ s12z_print_ccw_info (struct gdbarch *gdbarch,
struct value *v = value_of_register (reg, frame);
const char *name = gdbarch_register_name (gdbarch, reg);
uint32_t ccw = value_as_long (v);
- fputs_filtered (name, file);
+ gdb_puts (name, file);
size_t len = strlen (name);
const int stop_1 = 15;
const int stop_2 = 17;
for (int i = 0; i < stop_1 - len; ++i)
- fputc_filtered (' ', file);
- fprintf_filtered (file, "0x%04x", ccw);
+ gdb_putc (' ', file);
+ gdb_printf (file, "0x%04x", ccw);
for (int i = 0; i < stop_2 - len; ++i)
- fputc_filtered (' ', file);
+ gdb_putc (' ', file);
for (int b = 15; b >= 0; --b)
{
if (ccw & (0x1u << b))
{
if (ccw_bits[b] == 0)
- fputc_filtered ('1', file);
+ gdb_putc ('1', file);
else
- fputc_filtered (ccw_bits[b], file);
+ gdb_putc (ccw_bits[b], file);
}
else
- fputc_filtered (tolower (ccw_bits[b]), file);
+ gdb_putc (tolower (ccw_bits[b]), file);
}
- fputc_filtered ('\n', file);
+ gdb_putc ('\n', file);
}
static void
@@ -635,7 +632,7 @@ show_bdccsr_command (const char *args, int from_tty)
struct string_file output;
target_rcmd ("bdccsr", &output);
- printf_filtered ("The current BDCCSR value is %s\n", output.string().c_str());
+ gdb_printf ("The current BDCCSR value is %s\n", output.string().c_str());
}
static struct gdbarch *