From 0ef21242ea3a3441c100283ec88d88d27c033600 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 25 Apr 2003 22:14:05 +0000 Subject: 2003-04-25 Andrew Cagney * d10v-tdep.c (print_insn): Delete function. (display_trace): Use TARGET_PRINT_INSN. (_initialize_d10v_tdep): Do not set tm_print_insn. (d10v_gdbarch_init): Set print_insn. --- gdb/ChangeLog | 7 +++++++ gdb/d10v-tdep.c | 20 ++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e65665b..ce51e1d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2003-04-25 Andrew Cagney + * d10v-tdep.c (print_insn): Delete function. + (display_trace): Use TARGET_PRINT_INSN. + (_initialize_d10v_tdep): Do not set tm_print_insn. + (d10v_gdbarch_init): Set print_insn. + +2003-04-25 Andrew Cagney + * d10v-tdep.c (d10v_extract_return_value): Delete call to printf. (_initialize_d10v_tdep): Use add_setshow_boolean_cmd. (d10v_frame_unwind_cache): Use FRAME_OBSTACK_CALLOC. diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 0924bc6..bb62862 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -1207,19 +1207,6 @@ trace_info (char *args, int from_tty) printf_filtered ("Tracing is currently %s.\n", (tracing ? "on" : "off")); } -/* Print the instruction at address MEMADDR in debugged memory, - on STREAM. Returns length of the instruction, in bytes. */ - -static int -print_insn (CORE_ADDR memaddr, struct ui_file *stream) -{ - if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) - tm_print_insn_info.endian = BFD_ENDIAN_BIG; - else - tm_print_insn_info.endian = BFD_ENDIAN_LITTLE; - return TARGET_PRINT_INSN (memaddr, &tm_print_insn_info); -} - static void d10v_eva_prepare_to_trace (void) { @@ -1380,7 +1367,8 @@ display_trace (int low, int high) printf_filtered (":"); printf_filtered ("\t"); wrap_here (" "); - next_address = next_address + print_insn (next_address, gdb_stdout); + next_address += TARGET_PRINT_INSN (next_address, + &tm_print_insn_info); printf_filtered ("\n"); gdb_flush (gdb_stdout); } @@ -1673,6 +1661,8 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Return the unwound PC value. */ set_gdbarch_unwind_pc (gdbarch, d10v_unwind_pc); + set_gdbarch_print_insn (gdbarch, print_insn_d10v); + return gdbarch; } @@ -1681,8 +1671,6 @@ _initialize_d10v_tdep (void) { register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init); - tm_print_insn = print_insn_d10v; - target_resume_hook = d10v_eva_prepare_to_trace; target_wait_loop_hook = d10v_eva_get_trace_data; -- cgit v1.1