diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2000-11-24 21:24:04 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2000-11-24 21:24:04 +0000 |
commit | ea3881d97cf3257638dfe1b1d61f4f7705747e43 (patch) | |
tree | abd4292934ff79ebafff5aed39b0138596c3698c | |
parent | 5d1a66bd91bdf30574be9d23001dc80a2e246843 (diff) | |
download | gdb-ea3881d97cf3257638dfe1b1d61f4f7705747e43.zip gdb-ea3881d97cf3257638dfe1b1d61f4f7705747e43.tar.gz gdb-ea3881d97cf3257638dfe1b1d61f4f7705747e43.tar.bz2 |
Support 68HC12 arch in Gdb
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f1d5040..0606063 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * m68hc11-tdep.c (gdb_print_insn_m68hc11): New function. + (_initialize_m68hc11_tdep): Install it. Register bfd_arch_m68hc12. + +2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * m68hc11-tdep.c (gdbarch_tdep): Move stack_correction global to here. (STACK_CORRECTION): Get stack correction using gdbarch_tdep. (m68hc11_saved_pc_after_call): Use STACK_CORRECTION. diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index df22d6a..197c4a4 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -965,6 +965,15 @@ m68hc11_register_raw_size (int reg_nr) return M68HC11_REG_SIZE; } +static int +gdb_print_insn_m68hc11 (bfd_vma memaddr, disassemble_info *info) +{ + if (TARGET_ARCHITECTURE->arch == bfd_arch_m68hc11) + return print_insn_m68hc11 (memaddr, info); + else + return print_insn_m68hc12 (memaddr, info); +} + static struct gdbarch * m68hc11_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) @@ -1112,8 +1121,9 @@ void _initialize_m68hc11_tdep (void) { register_gdbarch_init (bfd_arch_m68hc11, m68hc11_gdbarch_init); + register_gdbarch_init (bfd_arch_m68hc12, m68hc11_gdbarch_init); if (!tm_print_insn) /* Someone may have already set it */ - tm_print_insn = print_insn_m68hc11; + tm_print_insn = gdb_print_insn_m68hc11; add_com ("regs", class_vars, show_regs, "Print all registers"); } |