aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/arch-utils.c8
-rw-r--r--gdb/arch-utils.h3
-rw-r--r--gdb/disasm.c18
-rw-r--r--gdb/gdbarch.c11
-rw-r--r--gdb/gdbarch.h11
-rwxr-xr-xgdb/gdbarch.sh17
7 files changed, 21 insertions, 59 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a3b6fe1..6280869 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,17 @@
2003-09-03 Andrew Cagney <cagney@redhat.com>
+ * arch-utils.h (legacy_print_insn): Delete declaration.
+ * arch-utils.c (legacy_print_insn): Delete function.
+ * disasm.c (deprecated_tm_print_insn_info): Delete.
+ (_initialize_disasm): Delete function, contained code initializing
+ deprecated_tm_print_insn_info.
+ * gdbarch.sh (deprecated_tm_print_insn): Delete.
+ (deprecated_tm_print_insn_info): Delete.
+ (TARGET_PRINT_INSN): Do not provide a default.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-09-03 Andrew Cagney <cagney@redhat.com>
+
* disasm.c (fprintf_disasm): New function.
(gdb_disassemble_info): Call "init_disassemble_info", instead of
INIT_DISASSEMBLE_INFO_NO_ARCH. Do not initialize "insn_sets",
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 968508d..e344ec0 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -140,14 +140,6 @@ generic_prologue_frameless_p (CORE_ADDR ip)
return ip == SKIP_PROLOGUE (ip);
}
-/* New/multi-arched targets should use the correct gdbarch field
- instead of using this global pointer. */
-int
-legacy_print_insn (bfd_vma vma, disassemble_info *info)
-{
- return (*deprecated_tm_print_insn) (vma, info);
-}
-
/* Helper functions for INNER_THAN */
int
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 6f53a8d..d2e6829 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -55,9 +55,6 @@ extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_in
language family, so that case is irrelevant for C. */
extern gdbarch_return_value_on_stack_ftype generic_return_value_on_stack_not;
-/* Accessor for old global function pointer for disassembly. */
-extern int legacy_print_insn (bfd_vma vma, disassemble_info *info);
-
/* Backward compatible call_dummy_words. */
extern LONGEST legacy_call_dummy_words[];
extern int legacy_sizeof_call_dummy_words;
diff --git a/gdb/disasm.c b/gdb/disasm.c
index b84571c..0dfd20a 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -393,21 +393,3 @@ gdb_print_insn (CORE_ADDR memaddr, struct ui_file *stream)
disassemble_info di = gdb_disassemble_info (current_gdbarch, stream);
return TARGET_PRINT_INSN (memaddr, &di);
}
-
-
-/* FIXME: cagney/2003-04-28: This global deprecated_tm_print_insn_info
- is going away. */
-disassemble_info deprecated_tm_print_insn_info;
-
-extern void _initialize_disasm (void);
-
-void
-_initialize_disasm (void)
-{
- init_disassemble_info (&deprecated_tm_print_insn_info, gdb_stdout,
- fprintf_disasm);
- deprecated_tm_print_insn_info.flavour = bfd_target_unknown_flavour;
- deprecated_tm_print_insn_info.read_memory_func = dis_asm_read_memory;
- deprecated_tm_print_insn_info.memory_error_func = dis_asm_memory_error;
- deprecated_tm_print_insn_info.print_address_func = dis_asm_print_address;
-}
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 523dfac..b523935 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -544,7 +544,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
current_gdbarch->smash_text_address = core_addr_identity;
- current_gdbarch->print_insn = legacy_print_insn;
current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
@@ -599,7 +598,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
struct cleanup *cleanups;
long dummy;
char *buf;
- /* Only perform sanity checks on a multi-arch target. */
log = mem_fileopen ();
cleanups = make_cleanup_ui_file_delete (log);
/* fundamental */
@@ -743,7 +741,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of addr_bits_remove, invalid_p == 0 */
/* Skip verify of smash_text_address, invalid_p == 0 */
/* Skip verify of software_single_step, has predicate */
- /* Skip verify of print_insn, invalid_p == 0 */
+ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
+ && (gdbarch->print_insn == 0))
+ fprintf_unfiltered (log, "\n\tprint_insn");
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
/* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
/* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
@@ -5948,11 +5948,6 @@ gdbarch_update_p (struct gdbarch_info info)
}
-/* Disassembler */
-
-/* Pointer to the target-dependent disassembly function. */
-int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
-
extern void _initialize_gdbarch (void);
void
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 7c26628..1471378 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2064,6 +2064,9 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s
#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
#endif
+/* FIXME: cagney/2003-08-28: Need to find a better way of selecting the
+ disassembler. Perhaphs objdump can handle it? */
+
typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
@@ -2560,14 +2563,6 @@ extern const struct bfd_arch_info *target_architecture;
#endif
-/* The target-system-dependent disassembler is semi-dynamic */
-
-/* Use gdb_disassemble, and gdbarch_print_insn instead. */
-extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
-
-/* Use set_gdbarch_print_insn instead. */
-extern disassemble_info deprecated_tm_print_insn_info;
-
/* Set the dynamic target-system-dependent parameters (architecture,
byte-order, ...) using information found in the BFD */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 331b1aa..9bb9d5c 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -672,7 +672,9 @@ f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr:::core_a
# FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
# single step. If not, then implement single step using breakpoints.
F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p
-f:2:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
+# FIXME: cagney/2003-08-28: Need to find a better way of selecting the
+# disassembler. Perhaphs objdump can handle it?
+f::TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::0:
f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
@@ -1205,14 +1207,6 @@ extern const struct bfd_arch_info *target_architecture;
#endif
-/* The target-system-dependent disassembler is semi-dynamic */
-
-/* Use gdb_disassemble, and gdbarch_print_insn instead. */
-extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
-
-/* Use set_gdbarch_print_insn instead. */
-extern disassemble_info deprecated_tm_print_insn_info;
-
/* Set the dynamic target-system-dependent parameters (architecture,
byte-order, ...) using information found in the BFD */
@@ -2301,11 +2295,6 @@ gdbarch_update_p (struct gdbarch_info info)
}
-/* Disassembler */
-
-/* Pointer to the target-dependent disassembly function. */
-int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
-
extern void _initialize_gdbarch (void);
void