diff options
author | Jeff Law <law@redhat.com> | 1996-06-18 23:29:39 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-06-18 23:29:39 +0000 |
commit | d15396dfe53119c52686697c4651bd646f74ee41 (patch) | |
tree | 24291f294fde9be3806c3196ec58d74a88c60e14 /gdb/h8300-tdep.c | |
parent | 934f9fa0ff4d46e9a0b66fb1f7993b75d953f23c (diff) | |
download | gdb-d15396dfe53119c52686697c4651bd646f74ee41.zip gdb-d15396dfe53119c52686697c4651bd646f74ee41.tar.gz gdb-d15396dfe53119c52686697c4651bd646f74ee41.tar.bz2 |
* h8300-dep.c (gdb_print_insn_h8300): Handle the H8/S.
(h8300_command): Likewise.
(set_machine): Likewise.
(set_machine_hook): Likewise.
(_initialize_h8300m): Likewise.
* config/h8300/tm-h8300.h (h8300smode): Declare.
More sanitized H8/S work.
Diffstat (limited to 'gdb/h8300-tdep.c')
-rw-r--r-- | gdb/h8300-tdep.c | 57 |
1 files changed, 54 insertions, 3 deletions
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 262faa8..cf455d8 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -121,7 +121,12 @@ gdb_print_insn_h8300 (memaddr, info) bfd_vma memaddr; disassemble_info *info; { - if (h8300hmode) +/* start-sanitize-h8s */ + if (h8300smode) + return print_insn_h8300s (memaddr, info); + else +/* end-sanitize-h8s */ + if (h8300hmode) return print_insn_h8300h (memaddr, info); else return print_insn_h8300 (memaddr, info); @@ -427,6 +432,9 @@ h8300_command(args, from_tty) { extern int h8300hmode; h8300hmode = 0; +/* start-sanitize-h8s */ + h8300smode = 0; +/* end-sanitize-h8s */ } static void @@ -434,14 +442,31 @@ h8300h_command(args, from_tty) { extern int h8300hmode; h8300hmode = 1; +/* start-sanitize-h8s */ + h8300smode = 0; +/* end-sanitize-h8s */ +} +/* start-sanitize-h8s */ +static void +h8300s_command(args, from_tty) +{ + extern int h8300smode; + extern int h8300hmode; + h8300smode = 1; + h8300hmode = 1; } +/* end-santiize-h8s */ + static void set_machine (args, from_tty) char *args; int from_tty; { - printf_unfiltered ("\"set machine\" must be followed by h8300 or h8300h.\n"); + printf_unfiltered ("\"set machine\" must be followed by h8300, h8300h"); +/* start-sanitize-h8s */ + printf_unfiltered ("or h8300s"); +/* end-sanitize-h8s */ help_list (setmemorylist, "set memory ", -1, gdb_stdout); } @@ -455,7 +480,28 @@ static void set_machine_hook (filename) char *filename; { - h8300hmode = (bfd_get_mach (exec_bfd) == bfd_mach_h8300h); +/* start-sanitize-h8s */ + if (bfd_get_mach (exec_bfd) == bfd_mach_h8300s) + { + h8300smode = 1; + h8300hmode = 1; + } + else +/* end-sanitize-h8s */ + if (bfd_get_mach (exec_bfd) == bfd_mach_h8300h) + { +/* start-sanitize-h8s */ + h8300smode = 0; +/* end-sanitize-h8s */ + h8300hmode = 1; + } + else + { +/* start-sanitize-h8s */ + h8300smode = 0; +/* end-sanitize-h8s */ + h8300hmode = 0; + } } void @@ -471,6 +517,11 @@ _initialize_h8300m () add_cmd ("h8300h", class_support, h8300h_command, "Set machine to be H8/300H.", &setmemorylist); +/* start-sanitize-h8s */ + add_cmd ("h8300s", class_support, h8300s_command, + "Set machine to be H8/300S.", &setmemorylist); +/* end-sanitize-h8s */ + /* Add a hook to set the machine type when we're loading a file. */ specify_exec_file_hook(set_machine_hook); |