diff options
author | nobody <> | 2003-03-03 20:50:21 +0000 |
---|---|---|
committer | nobody <> | 2003-03-03 20:50:21 +0000 |
commit | 900958cda09af0ca2839cc7e2a7c46355b051c83 (patch) | |
tree | 45e564da9eaed919ca56fc52f793cb0578b02a8b /gdb/m32r-rom.c | |
parent | cddd45abf62af6ed70c8c67601a9f09da0a939b0 (diff) | |
download | binutils-gdb-900958cda09af0ca2839cc7e2a7c46355b051c83.tar.gz |
This commit was manufactured by cvs2svn to create branchcagney_offbyone-20030303-branchpoint
'cagney_offbyone-20030303-branch'.
Sprout from interps-20030202-branch 2003-02-02 23:00:07 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2003-03-03 20:50:20 UTC Andrew Cagney <cagney@redhat.com> '2003-03-03 Andrew Cagney <cagney@redhat.com>':
ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/archures.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-h8300.c
bfd/coff-ppc.c
bfd/coffcode.h
bfd/config.bfd
bfd/cpu-arm.c
bfd/doc/ChangeLog
bfd/doc/bfd.texinfo
bfd/doc/fdl.texi
bfd/ecoff.c
bfd/elf-bfd.h
bfd/elf-eh-frame.c
bfd/elf.c
bfd/elf32-arm.h
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-m68k.c
bfd/elf32-mips.c
bfd/elf32-ppc.c
bfd/elf32-ppc.h
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-sparc.c
bfd/elf32-vax.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-mips.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-ppc.h
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcore.h
bfd/elflink.c
bfd/elflink.h
bfd/elfn32-mips.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/format.c
bfd/ieee.c
bfd/libbfd.h
bfd/libcoff.h
bfd/mmo.c
bfd/oasys.c
bfd/po/da.po
bfd/reloc.c
bfd/section.c
bfd/syms.c
bfd/targets.c
bfd/version.h
config.guess
config.sub
configure
configure.in
gdb/ChangeLog
gdb/MAINTAINERS
gdb/Makefile.in
gdb/NEWS
gdb/PROBLEMS
gdb/TODO
gdb/acinclude.m4
gdb/aclocal.m4
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h
gdb/ada-typeprint.c
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/block.c
gdb/block.h
gdb/blockframe.c
gdb/breakpoint.c
gdb/breakpoint.h
gdb/buildsym.c
gdb/buildsym.h
gdb/c-exp.y
gdb/c-valprint.c
gdb/cli-out.c
gdb/cli-out.h
gdb/cli/cli-cmds.c
gdb/cli/cli-decode.c
gdb/cli/cli-dump.c
gdb/cli/cli-interp.c
gdb/cli/cli-script.c
gdb/cli/cli-setshow.c
gdb/coff-pe-read.c
gdb/coff-pe-read.h
gdb/coffread.c
gdb/config.in
gdb/config/djgpp/fnchange.lst
gdb/config/h8500/h8500.mt
gdb/config/h8500/tm-h8500.h
gdb/config/i386/nm-i386.h
gdb/config/i386/nm-i386sco5.h
gdb/config/i386/nm-i386sol2.h
gdb/config/i386/tm-ptx.h
gdb/config/ia64/tm-ia64.h
gdb/config/m32r/m32r.mt
gdb/config/m32r/tm-m32r.h
gdb/config/mn10200/mn10200.mt
gdb/config/mn10200/tm-mn10200.h
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppa64.h
gdb/config/s390/nm-linux.h
gdb/config/sparc/nm-sun4sol2.h
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/config/z8k/tm-z8k.h
gdb/config/z8k/z8k.mt
gdb/configure
gdb/configure.host
gdb/configure.in
gdb/configure.tgt
gdb/cp-valprint.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/dbxread.c
gdb/defs.h
gdb/disasm.c
gdb/doc/ChangeLog
gdb/doc/Makefile.in
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doublest.c
gdb/dwarf2cfi.c
gdb/dwarf2expr.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/elfread.c
gdb/event-top.c
gdb/event-top.h
gdb/expprint.c
gdb/f-exp.y
gdb/f-lang.c
gdb/f-valprint.c
gdb/findvar.c
gdb/frame.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdb.c
gdb/gdb_mbuild.sh
gdb/gdb_thread_db.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v2-abi.c
gdb/h8300-tdep.c
gdb/h8500-tdep.c
gdb/hppa-tdep.c
gdb/hpread.c
gdb/hpux-thread.c
gdb/i386-interix-tdep.c
gdb/i386-linux-tdep.c
gdb/i386-tdep.c
gdb/i386bsd-tdep.c
gdb/ia64-linux-nat.c
gdb/ia64-tdep.c
gdb/infcmd.c
gdb/inflow.c
gdb/inflow.h
gdb/infptrace.c
gdb/infrun.c
gdb/inftarg.c
gdb/infttrace.c
gdb/interps.c
gdb/interps.h
gdb/jv-exp.y
gdb/jv-lang.c
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/linespec.c
gdb/linux-proc.c
gdb/lynx-nat.c
gdb/m2-exp.y
gdb/m32r-rom.c
gdb/m32r-stub.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/main.c
gdb/main.h
gdb/maint.c
gdb/mcore-tdep.c
gdb/mdebugread.c
gdb/mi/ChangeLog
gdb/mi/gdbmi.texinfo
gdb/mi/mi-cmd-env.c
gdb/mi/mi-cmd-stack.c
gdb/mi/mi-cmds.c
gdb/mi/mi-cmds.h
gdb/mi/mi-console.c
gdb/mi/mi-console.h
gdb/mi/mi-interp.c
gdb/mi/mi-main.c
gdb/mi/mi-main.h
gdb/minsyms.c
gdb/mips-tdep.c
gdb/mipsread.c
gdb/mn10200-tdep.c
gdb/mn10300-tdep.c
gdb/monitor.c
gdb/nlmread.c
gdb/ns32k-tdep.c
gdb/objc-exp.y
gdb/objc-lang.c
gdb/objc-lang.h
gdb/objfiles.c
gdb/objfiles.h
gdb/observer.c
gdb/observer.h
gdb/osabi.c
gdb/p-exp.y
gdb/p-valprint.c
gdb/parse.c
gdb/parser-defs.h
gdb/ppc-linux-nat.c
gdb/ppc-linux-tdep.c
gdb/printcmd.c
gdb/proc-api.c
gdb/procfs.c
gdb/rdi-share/ardi.c
gdb/regcache.c
gdb/regcache.h
gdb/remote-e7000.c
gdb/remote-sim.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sol-thread.c
gdb/solib-sunos.c
gdb/solib.c
gdb/solist.h
gdb/somread.c
gdb/somsolib.c
gdb/sparc-nat.c
gdb/sparc-tdep.c
gdb/stabsread.c
gdb/stack.c
gdb/symfile.c
gdb/symfile.h
gdb/symm-nat.c
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/Makefile.in
gdb/testsuite/configure.in
gdb/testsuite/gdb.base/advance.c
gdb/testsuite/gdb.base/advance.exp
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/exprs.exp
gdb/testsuite/gdb.base/funcargs.exp
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/ptype.exp
gdb/testsuite/gdb.base/restore.c
gdb/testsuite/gdb.base/until.exp
gdb/testsuite/gdb.base/watchpoint.exp
gdb/testsuite/gdb.c++/anon-union.exp
gdb/testsuite/gdb.c++/classes.exp
gdb/testsuite/gdb.c++/cplusfuncs.exp
gdb/testsuite/gdb.c++/inherit.exp
gdb/testsuite/gdb.c++/local.cc
gdb/testsuite/gdb.c++/local.exp
gdb/testsuite/gdb.c++/overload.cc
gdb/testsuite/gdb.c++/overload.exp
gdb/testsuite/gdb.c++/ovldbreak.exp
gdb/testsuite/gdb.c++/pr-1023.cc
gdb/testsuite/gdb.c++/pr-1023.exp
gdb/testsuite/gdb.c++/templates.exp
gdb/testsuite/gdb.c++/virtfunc.exp
gdb/testsuite/gdb.disasm/Makefile.in
gdb/testsuite/gdb.disasm/mn10200.exp
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/mi-cli.exp
gdb/testsuite/gdb.mi/mi-syn-frame.c
gdb/testsuite/gdb.mi/mi-syn-frame.exp
gdb/testsuite/gdb.trace/Makefile.in
gdb/testsuite/lib/gdb.exp
gdb/thread.c
gdb/top.c
gdb/tracepoint.c
gdb/tui/ChangeLog
gdb/tui/tui-hooks.c
gdb/tui/tui-interp.c
gdb/tui/tui.c
gdb/tui/tuiData.h
gdb/tui/tuiIO.c
gdb/typeprint.c
gdb/ui-out.c
gdb/ui-out.h
gdb/utils.c
gdb/v850-tdep.c
gdb/valops.c
gdb/value.h
gdb/values.c
gdb/vax-tdep.c
gdb/version.in
gdb/win32-nat.c
gdb/wrapper.h
gdb/x86-64-linux-nat.c
gdb/x86-64-tdep.c
gdb/xcoffread.c
gdb/xstormy16-tdep.c
gdb/z8k-tdep.c
include/ChangeLog
include/elf/ChangeLog
include/elf/arm.h
include/elf/ia64.h
include/elf/ppc.h
include/elf/ppc64.h
include/gdb/ChangeLog
include/gdb/remote-sim.h
include/libiberty.h
include/opcode/ChangeLog
include/opcode/h8300.h
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/acconfig.h
libiberty/aclocal.m4
libiberty/config.in
libiberty/configure
libiberty/configure.in
libiberty/cplus-dem.c
libiberty/functions.texi
libiberty/libiberty.texi
libiberty/lrealpath.c
libiberty/make-relative-prefix.c
libiberty/physmem.c
libtool.m4
ltcf-cxx.sh
ltcf-gcj.sh
ltconfig
opcodes/ChangeLog
opcodes/fr30-desc.c
opcodes/hppa-dis.c
opcodes/i386-dis.c
opcodes/mips-dis.c
readline/ChangeLog.gdb
readline/Makefile.in
readline/aclocal.m4
readline/config.h.in
readline/configure
readline/rlmbutil.h
readline/shlib/Makefile.in
sim/ChangeLog
sim/arm/ChangeLog
sim/arm/armos.c
sim/arm/wrapper.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/nrun.c
sim/common/sim-base.h
sim/common/sim-engine.c
sim/common/sim-engine.h
sim/common/sim-hload.c
sim/common/sim-module.c
sim/common/sim-utils.h
sim/d10v/ChangeLog
sim/d10v/interp.c
sim/erc32/ChangeLog
sim/erc32/interf.c
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8500/ChangeLog
sim/h8500/compile.c
sim/i960/ChangeLog
sim/i960/sim-if.c
sim/m32r/ChangeLog
sim/m32r/sim-if.c
sim/m68hc11/ChangeLog
sim/m68hc11/Makefile.in
sim/m68hc11/interp.c
sim/mcore/ChangeLog
sim/mcore/interp.c
sim/mips/ChangeLog
sim/mips/interp.c
sim/mn10200/ChangeLog
sim/mn10200/interp.c
sim/mn10300/ChangeLog
sim/mn10300/am33.igen
sim/mn10300/dv-mn103tim.c
sim/mn10300/interp.c
sim/ppc/ChangeLog
sim/ppc/sim_calls.c
sim/sh/ChangeLog
sim/sh/gencode.c
sim/sh/interp.c
sim/v850/ChangeLog
sim/v850/interp.c
sim/z8k/ChangeLog
sim/z8k/iface.c
Delete:
gdb/config/i386/gdbserve.mt
gdb/config/i386/i386sco5.mt
gdb/config/i386/i386v4.mt
gdb/config/i386/i386v42mp.mt
gdb/config/m68k/nm-apollo68b.h
gdb/config/m68k/nm-hp300bsd.h
gdb/config/m68k/tm-apollo68b.h
gdb/config/m68k/tm-es1800.h
gdb/config/m68k/tm-hp300bsd.h
gdb/config/m68k/tm-mac.h
gdb/config/m68k/xm-apollo68b.h
gdb/config/pa/hpux1020.mt
gdb/config/pa/hpux11.mt
gdb/config/pa/hpux11w.mt
gdb/config/powerpc/gdbserve.mt
gdb/config/powerpc/ppcle-eabi.mt
gdb/config/powerpc/ppcle-sim.mt
gdb/config/powerpc/tm-ppc-sim.h
gdb/config/sparc/sp64sim.mt
gdb/config/sparc/tm-sp64sim.h
sim/common/sim-break.c
sim/common/sim-break.h
Diffstat (limited to 'gdb/m32r-rom.c')
-rw-r--r-- | gdb/m32r-rom.c | 1252 |
1 files changed, 626 insertions, 626 deletions
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index b4bfefdf210..f8ac1542409 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -1,626 +1,626 @@ -/* Remote debugging interface to m32r and mon2000 ROM monitors for GDB, - the GNU debugger. - Copyright 1996, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - - Adapted by Michael Snyder of Cygnus Support. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This module defines communication with the Mitsubishi m32r monitor */ - -#include "defs.h" -#include "gdbcore.h" -#include "target.h" -#include "monitor.h" -#include "serial.h" -#include "symtab.h" -#include "command.h" -#include "gdbcmd.h" -#include "symfile.h" /* for generic load */ -#include <time.h> /* for time_t */ -#include "gdb_string.h" -#include "objfiles.h" /* for ALL_OBJFILES etc. */ -#include "inferior.h" /* for write_pc() */ -#include <ctype.h> -#include "regcache.h" - -extern void report_transfer_performance (unsigned long, time_t, time_t); - -/* - * All this stuff just to get my host computer's IP address! - */ -#include <sys/types.h> -#include <netdb.h> /* for hostent */ -#include <netinet/in.h> /* for struct in_addr */ -#if 1 -#include <arpa/inet.h> /* for inet_ntoa */ -#endif - -static char *board_addr; /* user-settable IP address for M32R-EVA */ -static char *server_addr; /* user-settable IP address for gdb host */ -static char *download_path; /* user-settable path for SREC files */ - - -/* - * Function: m32r_load_1 (helper function) - */ - -static void -m32r_load_section (bfd *abfd, asection *s, void *obj) -{ - unsigned int *data_count = obj; - if (s->flags & SEC_LOAD) - { - bfd_size_type section_size = bfd_section_size (abfd, s); - bfd_vma section_base = bfd_section_lma (abfd, s); - unsigned int buffer, i; - - *data_count += section_size; - - printf_filtered ("Loading section %s, size 0x%lx lma ", - bfd_section_name (abfd, s), section_size); - print_address_numeric (section_base, 1, gdb_stdout); - printf_filtered ("\n"); - gdb_flush (gdb_stdout); - monitor_printf ("%s mw\r", paddr_nz (section_base)); - for (i = 0; i < section_size; i += 4) - { - QUIT; - monitor_expect (" -> ", NULL, 0); - bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4); - monitor_printf ("%x\n", buffer); - } - monitor_expect (" -> ", NULL, 0); - monitor_printf ("q\n"); - monitor_expect_prompt (NULL, 0); - } -} - -static int -m32r_load_1 (void *dummy) -{ - int data_count = 0; - - bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count); - return data_count; -} - -/* - * Function: m32r_load (an alternate way to load) - */ - -static void -m32r_load (char *filename, int from_tty) -{ - bfd *abfd; - asection *s; - unsigned int i, data_count = 0; - time_t start_time, end_time; /* for timing of download */ - - if (filename == NULL || filename[0] == 0) - filename = get_exec_file (1); - - abfd = bfd_openr (filename, 0); - if (!abfd) - error ("Unable to open file %s\n", filename); - if (bfd_check_format (abfd, bfd_object) == 0) - error ("File is not an object file\n"); - start_time = time (NULL); -#if 0 - for (s = abfd->sections; s; s = s->next) - if (s->flags & SEC_LOAD) - { - bfd_size_type section_size = bfd_section_size (abfd, s); - bfd_vma section_base = bfd_section_vma (abfd, s); - unsigned int buffer; - - data_count += section_size; - - printf_filtered ("Loading section %s, size 0x%lx vma ", - bfd_section_name (abfd, s), section_size); - print_address_numeric (section_base, 1, gdb_stdout); - printf_filtered ("\n"); - gdb_flush (gdb_stdout); - monitor_printf ("%x mw\r", section_base); - for (i = 0; i < section_size; i += 4) - { - monitor_expect (" -> ", NULL, 0); - bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4); - monitor_printf ("%x\n", buffer); - } - monitor_expect (" -> ", NULL, 0); - monitor_printf ("q\n"); - monitor_expect_prompt (NULL, 0); - } -#else - if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL))) - { - monitor_printf ("q\n"); - return; - } -#endif - end_time = time (NULL); - printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd)); - report_transfer_performance (data_count, start_time, end_time); - - /* Finally, make the PC point at the start address */ - if (exec_bfd) - write_pc (bfd_get_start_address (exec_bfd)); - - inferior_ptid = null_ptid; /* No process now */ - - /* This is necessary because many things were based on the PC at the - time that we attached to the monitor, which is no longer valid - now that we have loaded new code (and just changed the PC). - Another way to do this might be to call normal_stop, except that - the stack may not be valid, and things would get horribly - confused... */ - - clear_symtab_users (); -} - -static void -m32r_load_gen (char *filename, int from_tty) -{ - generic_load (filename, from_tty); -} - -static void m32r_open (char *args, int from_tty); -static void mon2000_open (char *args, int from_tty); - -/* This array of registers needs to match the indexes used by GDB. The - whole reason this exists is because the various ROM monitors use - different names than GDB does, and don't support all the registers - either. So, typing "info reg sp" becomes an "A7". */ - -static char *m32r_regnames[] = -{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", - "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch", -}; - -static void -m32r_supply_register (char *regname, int regnamelen, char *val, int vallen) -{ - int regno; - int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]); - - for (regno = 0; regno < num_regs; regno++) - if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0) - break; - - if (regno >= num_regs) - return; /* no match */ - - if (regno == ACCL_REGNUM) - { /* special handling for 64-bit acc reg */ - monitor_supply_register (ACCH_REGNUM, val); - val = strchr (val, ':'); /* skip past ':' to get 2nd word */ - if (val != NULL) - monitor_supply_register (ACCL_REGNUM, val + 1); - } - else - { - monitor_supply_register (regno, val); - if (regno == PSW_REGNUM) - { - unsigned long psw = strtoul (val, NULL, 16); - char *zero = "00000000", *one = "00000001"; - -#ifdef SM_REGNUM - /* Stack mode bit */ - monitor_supply_register (SM_REGNUM, (psw & 0x80) ? one : zero); -#endif -#ifdef BSM_REGNUM - /* Backup stack mode bit */ - monitor_supply_register (BSM_REGNUM, (psw & 0x8000) ? one : zero); -#endif -#ifdef IE_REGNUM - /* Interrupt enable bit */ - monitor_supply_register (IE_REGNUM, (psw & 0x40) ? one : zero); -#endif -#ifdef BIE_REGNUM - /* Backup interrupt enable bit */ - monitor_supply_register (BIE_REGNUM, (psw & 0x4000) ? one : zero); -#endif -#ifdef COND_REGNUM - /* Condition bit (carry etc.) */ - monitor_supply_register (COND_REGNUM, (psw & 0x1) ? one : zero); -#endif -#ifdef CBR_REGNUM - monitor_supply_register (CBR_REGNUM, (psw & 0x1) ? one : zero); -#endif -#ifdef BPC_REGNUM - monitor_supply_register (BPC_REGNUM, zero); /* KLUDGE: (???????) */ -#endif -#ifdef BCARRY_REGNUM - monitor_supply_register (BCARRY_REGNUM, zero); /* KLUDGE: (??????) */ -#endif - } - - if (regno == SPI_REGNUM || regno == SPU_REGNUM) - { /* special handling for stack pointer (spu or spi) */ - unsigned long stackmode = read_register (PSW_REGNUM) & 0x80; - - if (regno == SPI_REGNUM && !stackmode) /* SP == SPI */ - monitor_supply_register (SP_REGNUM, val); - else if (regno == SPU_REGNUM && stackmode) /* SP == SPU */ - monitor_supply_register (SP_REGNUM, val); - } - } -} - -/* m32r RevC board monitor */ - -static struct target_ops m32r_ops; - -static char *m32r_inits[] = -{"\r", NULL}; - -static struct monitor_ops m32r_cmds; - -static void -init_m32r_cmds (void) -{ - m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST; - m32r_cmds.init = m32r_inits; /* Init strings */ - m32r_cmds.cont = "go\r"; /* continue command */ - m32r_cmds.step = "step\r"; /* single step */ - m32r_cmds.stop = NULL; /* interrupt command */ - m32r_cmds.set_break = "%x +bp\r"; /* set a breakpoint */ - m32r_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */ - m32r_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */ - m32r_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */ - m32r_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */ - m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */ - m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */ - m32r_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */ - m32r_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */ - m32r_cmds.setmem.term = NULL; /* setmem.term */ - m32r_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */ - m32r_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */ - m32r_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */ - m32r_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */ - m32r_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */ - m32r_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */ - m32r_cmds.getmem.term = NULL; /* getmem.term */ - m32r_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */ - m32r_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */ - m32r_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */ - m32r_cmds.setreg.term = NULL; /* setreg.term */ - m32r_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */ - m32r_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */ - m32r_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */ - m32r_cmds.getreg.term = NULL; /* getreg.term */ - m32r_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */ - m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */ - m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */ - m32r_cmds.supply_register = m32r_supply_register; /* supply_register */ - m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ - m32r_cmds.load = NULL; /* download command */ - m32r_cmds.loadresp = NULL; /* load response */ - m32r_cmds.prompt = "ok "; /* monitor command prompt */ - m32r_cmds.line_term = "\r"; /* end-of-line terminator */ - m32r_cmds.cmd_end = NULL; /* optional command terminator */ - m32r_cmds.target = &m32r_ops; /* target operations */ - m32r_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ - m32r_cmds.regnames = m32r_regnames; /* registers names */ - m32r_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ -} /* init_m32r_cmds */ - -static void -m32r_open (char *args, int from_tty) -{ - monitor_open (args, &m32r_cmds, from_tty); -} - -/* Mon2000 monitor (MSA2000 board) */ - -static struct target_ops mon2000_ops; -static struct monitor_ops mon2000_cmds; - -static void -init_mon2000_cmds (void) -{ - mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST; - mon2000_cmds.init = m32r_inits; /* Init strings */ - mon2000_cmds.cont = "go\r"; /* continue command */ - mon2000_cmds.step = "step\r"; /* single step */ - mon2000_cmds.stop = NULL; /* interrupt command */ - mon2000_cmds.set_break = "%x +bp\r"; /* set a breakpoint */ - mon2000_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */ - mon2000_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */ - mon2000_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */ - mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */ - mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */ - mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */ - mon2000_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */ - mon2000_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */ - mon2000_cmds.setmem.term = NULL; /* setmem.term */ - mon2000_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */ - mon2000_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */ - mon2000_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */ - mon2000_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */ - mon2000_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */ - mon2000_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */ - mon2000_cmds.getmem.term = NULL; /* getmem.term */ - mon2000_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */ - mon2000_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */ - mon2000_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */ - mon2000_cmds.setreg.term = NULL; /* setreg.term */ - mon2000_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */ - mon2000_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */ - mon2000_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */ - mon2000_cmds.getreg.term = NULL; /* getreg.term */ - mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */ - mon2000_cmds.dump_registers = ".reg\r"; /* dump_registers */ - mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */ - mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */ - mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ - mon2000_cmds.load = NULL; /* download command */ - mon2000_cmds.loadresp = NULL; /* load response */ - mon2000_cmds.prompt = "Mon2000>"; /* monitor command prompt */ - mon2000_cmds.line_term = "\r"; /* end-of-line terminator */ - mon2000_cmds.cmd_end = NULL; /* optional command terminator */ - mon2000_cmds.target = &mon2000_ops; /* target operations */ - mon2000_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ - mon2000_cmds.regnames = m32r_regnames; /* registers names */ - mon2000_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ -} /* init_mon2000_cmds */ - -static void -mon2000_open (char *args, int from_tty) -{ - monitor_open (args, &mon2000_cmds, from_tty); -} - -/* Function: set_board_address - Tell the BootOne monitor what it's ethernet IP address is. */ - -static void -m32r_set_board_address (char *args, int from_tty) -{ - int resp_len; - char buf[1024]; - - if (args && *args) - { - monitor_printf ("ulip %s\n", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - /* now parse the result for success */ - } - else - error ("Requires argument (IP address for M32R-EVA board)"); -} - -/* Function: set_server_address - Tell the BootOne monitor what gdb's ethernet IP address is. */ - -static void -m32r_set_server_address (char *args, int from_tty) -{ - int resp_len; - char buf[1024]; - - if (args && *args) - { - monitor_printf ("uhip %s\n", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - /* now parse the result for success */ - } - else - error ("Requires argument (IP address of GDB's host computer)"); -} - -/* Function: set_download_path - Tell the BootOne monitor the default path for downloadable SREC files. */ - -static void -m32r_set_download_path (char *args, int from_tty) -{ - int resp_len; - char buf[1024]; - - if (args && *args) - { - monitor_printf ("up %s\n", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - /* now parse the result for success */ - } - else - error ("Requires argument (default path for downloadable SREC files)"); -} - -static void -m32r_upload_command (char *args, int from_tty) -{ - bfd *abfd; - asection *s; - time_t start_time, end_time; /* for timing of download */ - int resp_len, data_count = 0; - char buf[1024]; - struct hostent *hostent; - struct in_addr inet_addr; - - /* first check to see if there's an ethernet port! */ - monitor_printf ("ust\r"); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); - if (!strchr (buf, ':')) - error ("No ethernet connection!"); - - if (board_addr == 0) - { - /* scan second colon in the output from the "ust" command */ - char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1; - - while (isspace (*myIPaddress)) - myIPaddress++; - - if (!strncmp (myIPaddress, "0.0.", 4)) /* empty */ - error ("Please use 'set board-address' to set the M32R-EVA board's IP address."); - if (strchr (myIPaddress, '(')) - *(strchr (myIPaddress, '(')) = '\0'; /* delete trailing junk */ - board_addr = xstrdup (myIPaddress); - } - if (server_addr == 0) - { - buf[0] = 0; - gethostname (buf, sizeof (buf)); - if (buf[0] != 0) - hostent = gethostbyname (buf); - if (hostent != 0) - { -#if 1 - memcpy (&inet_addr.s_addr, hostent->h_addr, - sizeof (inet_addr.s_addr)); - server_addr = (char *) inet_ntoa (inet_addr); -#else - server_addr = (char *) inet_ntoa (hostent->h_addr); -#endif - } - if (server_addr == 0) /* failed? */ - error ("Need to know gdb host computer's IP address (use 'set server-address')"); - } - - if (args == 0 || args[0] == 0) /* no args: upload the current file */ - args = get_exec_file (1); - - if (args[0] != '/' && download_path == 0) - { - if (current_directory) - download_path = xstrdup (current_directory); - else - error ("Need to know default download path (use 'set download-path')"); - } - - start_time = time (NULL); - monitor_printf ("uhip %s\r", server_addr); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ - monitor_printf ("ulip %s\r", board_addr); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ - if (args[0] != '/') - monitor_printf ("up %s\r", download_path); /* use default path */ - else - monitor_printf ("up\r"); /* rooted filename/path */ - resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ - - if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec")) - monitor_printf ("ul %s\r", args); - else /* add ".srec" suffix */ - monitor_printf ("ul %s.srec\r", args); - resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ - - if (buf[0] == 0 || strstr (buf, "complete") == 0) - error ("Upload file not found: %s.srec\nCheck IP addresses and download path.", args); - else - printf_filtered (" -- Ethernet load complete.\n"); - - end_time = time (NULL); - abfd = bfd_openr (args, 0); - if (abfd != NULL) - { /* Download is done -- print section statistics */ - if (bfd_check_format (abfd, bfd_object) == 0) - { - printf_filtered ("File is not an object file\n"); - } - for (s = abfd->sections; s; s = s->next) - if (s->flags & SEC_LOAD) - { - bfd_size_type section_size = bfd_section_size (abfd, s); - bfd_vma section_base = bfd_section_lma (abfd, s); - unsigned int buffer; - - data_count += section_size; - - printf_filtered ("Loading section %s, size 0x%lx lma ", - bfd_section_name (abfd, s), section_size); - print_address_numeric (section_base, 1, gdb_stdout); - printf_filtered ("\n"); - gdb_flush (gdb_stdout); - } - /* Finally, make the PC point at the start address */ - write_pc (bfd_get_start_address (abfd)); - report_transfer_performance (data_count, start_time, end_time); - printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd)); - } - inferior_ptid = null_ptid; /* No process now */ - - /* This is necessary because many things were based on the PC at the - time that we attached to the monitor, which is no longer valid - now that we have loaded new code (and just changed the PC). - Another way to do this might be to call normal_stop, except that - the stack may not be valid, and things would get horribly - confused... */ - - clear_symtab_users (); -} - -void -_initialize_m32r_rom (void) -{ - /* Initialize m32r RevC monitor target */ - init_m32r_cmds (); - init_monitor_ops (&m32r_ops); - - m32r_ops.to_shortname = "m32r"; - m32r_ops.to_longname = "m32r monitor"; - m32r_ops.to_load = m32r_load_gen; /* monitor lacks a download command */ - m32r_ops.to_doc = "Debug via the m32r monitor.\n\ -Specify the serial device it is connected to (e.g. /dev/ttya)."; - m32r_ops.to_open = m32r_open; - add_target (&m32r_ops); - - /* Initialize mon2000 monitor target */ - init_mon2000_cmds (); - init_monitor_ops (&mon2000_ops); - - mon2000_ops.to_shortname = "mon2000"; - mon2000_ops.to_longname = "Mon2000 monitor"; - mon2000_ops.to_load = m32r_load_gen; /* monitor lacks a download command */ - mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\ -Specify the serial device it is connected to (e.g. /dev/ttya)."; - mon2000_ops.to_open = mon2000_open; - add_target (&mon2000_ops); - - add_show_from_set - (add_set_cmd ("download-path", class_obscure, var_string, - (char *) &download_path, - "Set the default path for downloadable SREC files.", - &setlist), - &showlist); - - add_show_from_set - (add_set_cmd ("board-address", class_obscure, var_string, - (char *) &board_addr, - "Set IP address for M32R-EVA target board.", - &setlist), - &showlist); - - add_show_from_set - (add_set_cmd ("server-address", class_obscure, var_string, - (char *) &server_addr, - "Set IP address for download server (GDB's host computer).", - &setlist), - &showlist); - - add_com ("upload", class_obscure, m32r_upload_command, - "Upload the srec file via the monitor's Ethernet upload capability."); - - add_com ("tload", class_obscure, m32r_load, "test upload command."); -} +// OBSOLETE /* Remote debugging interface to m32r and mon2000 ROM monitors for GDB, +// OBSOLETE the GNU debugger. +// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 +// OBSOLETE Free Software Foundation, Inc. +// OBSOLETE +// OBSOLETE Adapted by Michael Snyder of Cygnus Support. +// OBSOLETE +// OBSOLETE This file is part of GDB. +// OBSOLETE +// OBSOLETE This program is free software; you can redistribute it and/or modify +// OBSOLETE it under the terms of the GNU General Public License as published by +// OBSOLETE the Free Software Foundation; either version 2 of the License, or +// OBSOLETE (at your option) any later version. +// OBSOLETE +// OBSOLETE This program is distributed in the hope that it will be useful, +// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of +// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// OBSOLETE GNU General Public License for more details. +// OBSOLETE +// OBSOLETE You should have received a copy of the GNU General Public License +// OBSOLETE along with this program; if not, write to the Free Software +// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, +// OBSOLETE Boston, MA 02111-1307, USA. */ +// OBSOLETE +// OBSOLETE /* This module defines communication with the Mitsubishi m32r monitor */ +// OBSOLETE +// OBSOLETE #include "defs.h" +// OBSOLETE #include "gdbcore.h" +// OBSOLETE #include "target.h" +// OBSOLETE #include "monitor.h" +// OBSOLETE #include "serial.h" +// OBSOLETE #include "symtab.h" +// OBSOLETE #include "command.h" +// OBSOLETE #include "gdbcmd.h" +// OBSOLETE #include "symfile.h" /* for generic load */ +// OBSOLETE #include <time.h> /* for time_t */ +// OBSOLETE #include "gdb_string.h" +// OBSOLETE #include "objfiles.h" /* for ALL_OBJFILES etc. */ +// OBSOLETE #include "inferior.h" /* for write_pc() */ +// OBSOLETE #include <ctype.h> +// OBSOLETE #include "regcache.h" +// OBSOLETE +// OBSOLETE extern void report_transfer_performance (unsigned long, time_t, time_t); +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * All this stuff just to get my host computer's IP address! +// OBSOLETE */ +// OBSOLETE #include <sys/types.h> +// OBSOLETE #include <netdb.h> /* for hostent */ +// OBSOLETE #include <netinet/in.h> /* for struct in_addr */ +// OBSOLETE #if 1 +// OBSOLETE #include <arpa/inet.h> /* for inet_ntoa */ +// OBSOLETE #endif +// OBSOLETE +// OBSOLETE static char *board_addr; /* user-settable IP address for M32R-EVA */ +// OBSOLETE static char *server_addr; /* user-settable IP address for gdb host */ +// OBSOLETE static char *download_path; /* user-settable path for SREC files */ +// OBSOLETE +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * Function: m32r_load_1 (helper function) +// OBSOLETE */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_load_section (bfd *abfd, asection *s, void *obj) +// OBSOLETE { +// OBSOLETE unsigned int *data_count = obj; +// OBSOLETE if (s->flags & SEC_LOAD) +// OBSOLETE { +// OBSOLETE bfd_size_type section_size = bfd_section_size (abfd, s); +// OBSOLETE bfd_vma section_base = bfd_section_lma (abfd, s); +// OBSOLETE unsigned int buffer, i; +// OBSOLETE +// OBSOLETE *data_count += section_size; +// OBSOLETE +// OBSOLETE printf_filtered ("Loading section %s, size 0x%lx lma ", +// OBSOLETE bfd_section_name (abfd, s), section_size); +// OBSOLETE print_address_numeric (section_base, 1, gdb_stdout); +// OBSOLETE printf_filtered ("\n"); +// OBSOLETE gdb_flush (gdb_stdout); +// OBSOLETE monitor_printf ("%s mw\r", paddr_nz (section_base)); +// OBSOLETE for (i = 0; i < section_size; i += 4) +// OBSOLETE { +// OBSOLETE QUIT; +// OBSOLETE monitor_expect (" -> ", NULL, 0); +// OBSOLETE bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4); +// OBSOLETE monitor_printf ("%x\n", buffer); +// OBSOLETE } +// OBSOLETE monitor_expect (" -> ", NULL, 0); +// OBSOLETE monitor_printf ("q\n"); +// OBSOLETE monitor_expect_prompt (NULL, 0); +// OBSOLETE } +// OBSOLETE } +// OBSOLETE +// OBSOLETE static int +// OBSOLETE m32r_load_1 (void *dummy) +// OBSOLETE { +// OBSOLETE int data_count = 0; +// OBSOLETE +// OBSOLETE bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count); +// OBSOLETE return data_count; +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* +// OBSOLETE * Function: m32r_load (an alternate way to load) +// OBSOLETE */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_load (char *filename, int from_tty) +// OBSOLETE { +// OBSOLETE bfd *abfd; +// OBSOLETE asection *s; +// OBSOLETE unsigned int i, data_count = 0; +// OBSOLETE time_t start_time, end_time; /* for timing of download */ +// OBSOLETE +// OBSOLETE if (filename == NULL || filename[0] == 0) +// OBSOLETE filename = get_exec_file (1); +// OBSOLETE +// OBSOLETE abfd = bfd_openr (filename, 0); +// OBSOLETE if (!abfd) +// OBSOLETE error ("Unable to open file %s\n", filename); +// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0) +// OBSOLETE error ("File is not an object file\n"); +// OBSOLETE start_time = time (NULL); +// OBSOLETE #if 0 +// OBSOLETE for (s = abfd->sections; s; s = s->next) +// OBSOLETE if (s->flags & SEC_LOAD) +// OBSOLETE { +// OBSOLETE bfd_size_type section_size = bfd_section_size (abfd, s); +// OBSOLETE bfd_vma section_base = bfd_section_vma (abfd, s); +// OBSOLETE unsigned int buffer; +// OBSOLETE +// OBSOLETE data_count += section_size; +// OBSOLETE +// OBSOLETE printf_filtered ("Loading section %s, size 0x%lx vma ", +// OBSOLETE bfd_section_name (abfd, s), section_size); +// OBSOLETE print_address_numeric (section_base, 1, gdb_stdout); +// OBSOLETE printf_filtered ("\n"); +// OBSOLETE gdb_flush (gdb_stdout); +// OBSOLETE monitor_printf ("%x mw\r", section_base); +// OBSOLETE for (i = 0; i < section_size; i += 4) +// OBSOLETE { +// OBSOLETE monitor_expect (" -> ", NULL, 0); +// OBSOLETE bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4); +// OBSOLETE monitor_printf ("%x\n", buffer); +// OBSOLETE } +// OBSOLETE monitor_expect (" -> ", NULL, 0); +// OBSOLETE monitor_printf ("q\n"); +// OBSOLETE monitor_expect_prompt (NULL, 0); +// OBSOLETE } +// OBSOLETE #else +// OBSOLETE if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL))) +// OBSOLETE { +// OBSOLETE monitor_printf ("q\n"); +// OBSOLETE return; +// OBSOLETE } +// OBSOLETE #endif +// OBSOLETE end_time = time (NULL); +// OBSOLETE printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd)); +// OBSOLETE report_transfer_performance (data_count, start_time, end_time); +// OBSOLETE +// OBSOLETE /* Finally, make the PC point at the start address */ +// OBSOLETE if (exec_bfd) +// OBSOLETE write_pc (bfd_get_start_address (exec_bfd)); +// OBSOLETE +// OBSOLETE inferior_ptid = null_ptid; /* No process now */ +// OBSOLETE +// OBSOLETE /* This is necessary because many things were based on the PC at the +// OBSOLETE time that we attached to the monitor, which is no longer valid +// OBSOLETE now that we have loaded new code (and just changed the PC). +// OBSOLETE Another way to do this might be to call normal_stop, except that +// OBSOLETE the stack may not be valid, and things would get horribly +// OBSOLETE confused... */ +// OBSOLETE +// OBSOLETE clear_symtab_users (); +// OBSOLETE } +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_load_gen (char *filename, int from_tty) +// OBSOLETE { +// OBSOLETE generic_load (filename, from_tty); +// OBSOLETE } +// OBSOLETE +// OBSOLETE static void m32r_open (char *args, int from_tty); +// OBSOLETE static void mon2000_open (char *args, int from_tty); +// OBSOLETE +// OBSOLETE /* This array of registers needs to match the indexes used by GDB. The +// OBSOLETE whole reason this exists is because the various ROM monitors use +// OBSOLETE different names than GDB does, and don't support all the registers +// OBSOLETE either. So, typing "info reg sp" becomes an "A7". */ +// OBSOLETE +// OBSOLETE static char *m32r_regnames[] = +// OBSOLETE {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", +// OBSOLETE "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", +// OBSOLETE "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch", +// OBSOLETE }; +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_supply_register (char *regname, int regnamelen, char *val, int vallen) +// OBSOLETE { +// OBSOLETE int regno; +// OBSOLETE int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]); +// OBSOLETE +// OBSOLETE for (regno = 0; regno < num_regs; regno++) +// OBSOLETE if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0) +// OBSOLETE break; +// OBSOLETE +// OBSOLETE if (regno >= num_regs) +// OBSOLETE return; /* no match */ +// OBSOLETE +// OBSOLETE if (regno == ACCL_REGNUM) +// OBSOLETE { /* special handling for 64-bit acc reg */ +// OBSOLETE monitor_supply_register (ACCH_REGNUM, val); +// OBSOLETE val = strchr (val, ':'); /* skip past ':' to get 2nd word */ +// OBSOLETE if (val != NULL) +// OBSOLETE monitor_supply_register (ACCL_REGNUM, val + 1); +// OBSOLETE } +// OBSOLETE else +// OBSOLETE { +// OBSOLETE monitor_supply_register (regno, val); +// OBSOLETE if (regno == PSW_REGNUM) +// OBSOLETE { +// OBSOLETE unsigned long psw = strtoul (val, NULL, 16); +// OBSOLETE char *zero = "00000000", *one = "00000001"; +// OBSOLETE +// OBSOLETE #ifdef SM_REGNUM +// OBSOLETE /* Stack mode bit */ +// OBSOLETE monitor_supply_register (SM_REGNUM, (psw & 0x80) ? one : zero); +// OBSOLETE #endif +// OBSOLETE #ifdef BSM_REGNUM +// OBSOLETE /* Backup stack mode bit */ +// OBSOLETE monitor_supply_register (BSM_REGNUM, (psw & 0x8000) ? one : zero); +// OBSOLETE #endif +// OBSOLETE #ifdef IE_REGNUM +// OBSOLETE /* Interrupt enable bit */ +// OBSOLETE monitor_supply_register (IE_REGNUM, (psw & 0x40) ? one : zero); +// OBSOLETE #endif +// OBSOLETE #ifdef BIE_REGNUM +// OBSOLETE /* Backup interrupt enable bit */ +// OBSOLETE monitor_supply_register (BIE_REGNUM, (psw & 0x4000) ? one : zero); +// OBSOLETE #endif +// OBSOLETE #ifdef COND_REGNUM +// OBSOLETE /* Condition bit (carry etc.) */ +// OBSOLETE monitor_supply_register (COND_REGNUM, (psw & 0x1) ? one : zero); +// OBSOLETE #endif +// OBSOLETE #ifdef CBR_REGNUM +// OBSOLETE monitor_supply_register (CBR_REGNUM, (psw & 0x1) ? one : zero); +// OBSOLETE #endif +// OBSOLETE #ifdef BPC_REGNUM +// OBSOLETE monitor_supply_register (BPC_REGNUM, zero); /* KLUDGE: (???????) */ +// OBSOLETE #endif +// OBSOLETE #ifdef BCARRY_REGNUM +// OBSOLETE monitor_supply_register (BCARRY_REGNUM, zero); /* KLUDGE: (??????) */ +// OBSOLETE #endif +// OBSOLETE } +// OBSOLETE +// OBSOLETE if (regno == SPI_REGNUM || regno == SPU_REGNUM) +// OBSOLETE { /* special handling for stack pointer (spu or spi) */ +// OBSOLETE unsigned long stackmode = read_register (PSW_REGNUM) & 0x80; +// OBSOLETE +// OBSOLETE if (regno == SPI_REGNUM && !stackmode) /* SP == SPI */ +// OBSOLETE monitor_supply_register (SP_REGNUM, val); +// OBSOLETE else if (regno == SPU_REGNUM && stackmode) /* SP == SPU */ +// OBSOLETE monitor_supply_register (SP_REGNUM, val); +// OBSOLETE } +// OBSOLETE } +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* m32r RevC board monitor */ +// OBSOLETE +// OBSOLETE static struct target_ops m32r_ops; +// OBSOLETE +// OBSOLETE static char *m32r_inits[] = +// OBSOLETE {"\r", NULL}; +// OBSOLETE +// OBSOLETE static struct monitor_ops m32r_cmds; +// OBSOLETE +// OBSOLETE static void +// OBSOLETE init_m32r_cmds (void) +// OBSOLETE { +// OBSOLETE m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST; +// OBSOLETE m32r_cmds.init = m32r_inits; /* Init strings */ +// OBSOLETE m32r_cmds.cont = "go\r"; /* continue command */ +// OBSOLETE m32r_cmds.step = "step\r"; /* single step */ +// OBSOLETE m32r_cmds.stop = NULL; /* interrupt command */ +// OBSOLETE m32r_cmds.set_break = "%x +bp\r"; /* set a breakpoint */ +// OBSOLETE m32r_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */ +// OBSOLETE m32r_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */ +// OBSOLETE m32r_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */ +// OBSOLETE m32r_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */ +// OBSOLETE m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */ +// OBSOLETE m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */ +// OBSOLETE m32r_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */ +// OBSOLETE m32r_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */ +// OBSOLETE m32r_cmds.setmem.term = NULL; /* setmem.term */ +// OBSOLETE m32r_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */ +// OBSOLETE m32r_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */ +// OBSOLETE m32r_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */ +// OBSOLETE m32r_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */ +// OBSOLETE m32r_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */ +// OBSOLETE m32r_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */ +// OBSOLETE m32r_cmds.getmem.term = NULL; /* getmem.term */ +// OBSOLETE m32r_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */ +// OBSOLETE m32r_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */ +// OBSOLETE m32r_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */ +// OBSOLETE m32r_cmds.setreg.term = NULL; /* setreg.term */ +// OBSOLETE m32r_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */ +// OBSOLETE m32r_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */ +// OBSOLETE m32r_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */ +// OBSOLETE m32r_cmds.getreg.term = NULL; /* getreg.term */ +// OBSOLETE m32r_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */ +// OBSOLETE m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */ +// OBSOLETE m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */ +// OBSOLETE m32r_cmds.supply_register = m32r_supply_register; /* supply_register */ +// OBSOLETE m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ +// OBSOLETE m32r_cmds.load = NULL; /* download command */ +// OBSOLETE m32r_cmds.loadresp = NULL; /* load response */ +// OBSOLETE m32r_cmds.prompt = "ok "; /* monitor command prompt */ +// OBSOLETE m32r_cmds.line_term = "\r"; /* end-of-line terminator */ +// OBSOLETE m32r_cmds.cmd_end = NULL; /* optional command terminator */ +// OBSOLETE m32r_cmds.target = &m32r_ops; /* target operations */ +// OBSOLETE m32r_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ +// OBSOLETE m32r_cmds.regnames = m32r_regnames; /* registers names */ +// OBSOLETE m32r_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ +// OBSOLETE } /* init_m32r_cmds */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_open (char *args, int from_tty) +// OBSOLETE { +// OBSOLETE monitor_open (args, &m32r_cmds, from_tty); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Mon2000 monitor (MSA2000 board) */ +// OBSOLETE +// OBSOLETE static struct target_ops mon2000_ops; +// OBSOLETE static struct monitor_ops mon2000_cmds; +// OBSOLETE +// OBSOLETE static void +// OBSOLETE init_mon2000_cmds (void) +// OBSOLETE { +// OBSOLETE mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST; +// OBSOLETE mon2000_cmds.init = m32r_inits; /* Init strings */ +// OBSOLETE mon2000_cmds.cont = "go\r"; /* continue command */ +// OBSOLETE mon2000_cmds.step = "step\r"; /* single step */ +// OBSOLETE mon2000_cmds.stop = NULL; /* interrupt command */ +// OBSOLETE mon2000_cmds.set_break = "%x +bp\r"; /* set a breakpoint */ +// OBSOLETE mon2000_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */ +// OBSOLETE mon2000_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */ +// OBSOLETE mon2000_cmds.fill = "%x %x %x fill\r"; /* fill (start length val) */ +// OBSOLETE mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */ +// OBSOLETE mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */ +// OBSOLETE mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */ +// OBSOLETE mon2000_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */ +// OBSOLETE mon2000_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */ +// OBSOLETE mon2000_cmds.setmem.term = NULL; /* setmem.term */ +// OBSOLETE mon2000_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */ +// OBSOLETE mon2000_cmds.getmem.cmdb = "%x %x dump\r"; /* getmem.cmdb (addr, len) */ +// OBSOLETE mon2000_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */ +// OBSOLETE mon2000_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */ +// OBSOLETE mon2000_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */ +// OBSOLETE mon2000_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */ +// OBSOLETE mon2000_cmds.getmem.term = NULL; /* getmem.term */ +// OBSOLETE mon2000_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */ +// OBSOLETE mon2000_cmds.setreg.cmd = "%x to %%%s\r"; /* setreg.cmd (name, value) */ +// OBSOLETE mon2000_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */ +// OBSOLETE mon2000_cmds.setreg.term = NULL; /* setreg.term */ +// OBSOLETE mon2000_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */ +// OBSOLETE mon2000_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */ +// OBSOLETE mon2000_cmds.getreg.resp_delim = NULL; /* getreg.resp_delim */ +// OBSOLETE mon2000_cmds.getreg.term = NULL; /* getreg.term */ +// OBSOLETE mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */ +// OBSOLETE mon2000_cmds.dump_registers = ".reg\r"; /* dump_registers */ +// OBSOLETE mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */ +// OBSOLETE mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */ +// OBSOLETE mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */ +// OBSOLETE mon2000_cmds.load = NULL; /* download command */ +// OBSOLETE mon2000_cmds.loadresp = NULL; /* load response */ +// OBSOLETE mon2000_cmds.prompt = "Mon2000>"; /* monitor command prompt */ +// OBSOLETE mon2000_cmds.line_term = "\r"; /* end-of-line terminator */ +// OBSOLETE mon2000_cmds.cmd_end = NULL; /* optional command terminator */ +// OBSOLETE mon2000_cmds.target = &mon2000_ops; /* target operations */ +// OBSOLETE mon2000_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ +// OBSOLETE mon2000_cmds.regnames = m32r_regnames; /* registers names */ +// OBSOLETE mon2000_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ +// OBSOLETE } /* init_mon2000_cmds */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE mon2000_open (char *args, int from_tty) +// OBSOLETE { +// OBSOLETE monitor_open (args, &mon2000_cmds, from_tty); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Function: set_board_address +// OBSOLETE Tell the BootOne monitor what it's ethernet IP address is. */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_set_board_address (char *args, int from_tty) +// OBSOLETE { +// OBSOLETE int resp_len; +// OBSOLETE char buf[1024]; +// OBSOLETE +// OBSOLETE if (args && *args) +// OBSOLETE { +// OBSOLETE monitor_printf ("ulip %s\n", args); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); +// OBSOLETE /* now parse the result for success */ +// OBSOLETE } +// OBSOLETE else +// OBSOLETE error ("Requires argument (IP address for M32R-EVA board)"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Function: set_server_address +// OBSOLETE Tell the BootOne monitor what gdb's ethernet IP address is. */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_set_server_address (char *args, int from_tty) +// OBSOLETE { +// OBSOLETE int resp_len; +// OBSOLETE char buf[1024]; +// OBSOLETE +// OBSOLETE if (args && *args) +// OBSOLETE { +// OBSOLETE monitor_printf ("uhip %s\n", args); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); +// OBSOLETE /* now parse the result for success */ +// OBSOLETE } +// OBSOLETE else +// OBSOLETE error ("Requires argument (IP address of GDB's host computer)"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE /* Function: set_download_path +// OBSOLETE Tell the BootOne monitor the default path for downloadable SREC files. */ +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_set_download_path (char *args, int from_tty) +// OBSOLETE { +// OBSOLETE int resp_len; +// OBSOLETE char buf[1024]; +// OBSOLETE +// OBSOLETE if (args && *args) +// OBSOLETE { +// OBSOLETE monitor_printf ("up %s\n", args); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); +// OBSOLETE /* now parse the result for success */ +// OBSOLETE } +// OBSOLETE else +// OBSOLETE error ("Requires argument (default path for downloadable SREC files)"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE static void +// OBSOLETE m32r_upload_command (char *args, int from_tty) +// OBSOLETE { +// OBSOLETE bfd *abfd; +// OBSOLETE asection *s; +// OBSOLETE time_t start_time, end_time; /* for timing of download */ +// OBSOLETE int resp_len, data_count = 0; +// OBSOLETE char buf[1024]; +// OBSOLETE struct hostent *hostent; +// OBSOLETE struct in_addr inet_addr; +// OBSOLETE +// OBSOLETE /* first check to see if there's an ethernet port! */ +// OBSOLETE monitor_printf ("ust\r"); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); +// OBSOLETE if (!strchr (buf, ':')) +// OBSOLETE error ("No ethernet connection!"); +// OBSOLETE +// OBSOLETE if (board_addr == 0) +// OBSOLETE { +// OBSOLETE /* scan second colon in the output from the "ust" command */ +// OBSOLETE char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1; +// OBSOLETE +// OBSOLETE while (isspace (*myIPaddress)) +// OBSOLETE myIPaddress++; +// OBSOLETE +// OBSOLETE if (!strncmp (myIPaddress, "0.0.", 4)) /* empty */ +// OBSOLETE error ("Please use 'set board-address' to set the M32R-EVA board's IP address."); +// OBSOLETE if (strchr (myIPaddress, '(')) +// OBSOLETE *(strchr (myIPaddress, '(')) = '\0'; /* delete trailing junk */ +// OBSOLETE board_addr = xstrdup (myIPaddress); +// OBSOLETE } +// OBSOLETE if (server_addr == 0) +// OBSOLETE { +// OBSOLETE buf[0] = 0; +// OBSOLETE gethostname (buf, sizeof (buf)); +// OBSOLETE if (buf[0] != 0) +// OBSOLETE hostent = gethostbyname (buf); +// OBSOLETE if (hostent != 0) +// OBSOLETE { +// OBSOLETE #if 1 +// OBSOLETE memcpy (&inet_addr.s_addr, hostent->h_addr, +// OBSOLETE sizeof (inet_addr.s_addr)); +// OBSOLETE server_addr = (char *) inet_ntoa (inet_addr); +// OBSOLETE #else +// OBSOLETE server_addr = (char *) inet_ntoa (hostent->h_addr); +// OBSOLETE #endif +// OBSOLETE } +// OBSOLETE if (server_addr == 0) /* failed? */ +// OBSOLETE error ("Need to know gdb host computer's IP address (use 'set server-address')"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE if (args == 0 || args[0] == 0) /* no args: upload the current file */ +// OBSOLETE args = get_exec_file (1); +// OBSOLETE +// OBSOLETE if (args[0] != '/' && download_path == 0) +// OBSOLETE { +// OBSOLETE if (current_directory) +// OBSOLETE download_path = xstrdup (current_directory); +// OBSOLETE else +// OBSOLETE error ("Need to know default download path (use 'set download-path')"); +// OBSOLETE } +// OBSOLETE +// OBSOLETE start_time = time (NULL); +// OBSOLETE monitor_printf ("uhip %s\r", server_addr); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ +// OBSOLETE monitor_printf ("ulip %s\r", board_addr); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ +// OBSOLETE if (args[0] != '/') +// OBSOLETE monitor_printf ("up %s\r", download_path); /* use default path */ +// OBSOLETE else +// OBSOLETE monitor_printf ("up\r"); /* rooted filename/path */ +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ +// OBSOLETE +// OBSOLETE if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec")) +// OBSOLETE monitor_printf ("ul %s\r", args); +// OBSOLETE else /* add ".srec" suffix */ +// OBSOLETE monitor_printf ("ul %s.srec\r", args); +// OBSOLETE resp_len = monitor_expect_prompt (buf, sizeof (buf)); /* parse result? */ +// OBSOLETE +// OBSOLETE if (buf[0] == 0 || strstr (buf, "complete") == 0) +// OBSOLETE error ("Upload file not found: %s.srec\nCheck IP addresses and download path.", args); +// OBSOLETE else +// OBSOLETE printf_filtered (" -- Ethernet load complete.\n"); +// OBSOLETE +// OBSOLETE end_time = time (NULL); +// OBSOLETE abfd = bfd_openr (args, 0); +// OBSOLETE if (abfd != NULL) +// OBSOLETE { /* Download is done -- print section statistics */ +// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0) +// OBSOLETE { +// OBSOLETE printf_filtered ("File is not an object file\n"); +// OBSOLETE } +// OBSOLETE for (s = abfd->sections; s; s = s->next) +// OBSOLETE if (s->flags & SEC_LOAD) +// OBSOLETE { +// OBSOLETE bfd_size_type section_size = bfd_section_size (abfd, s); +// OBSOLETE bfd_vma section_base = bfd_section_lma (abfd, s); +// OBSOLETE unsigned int buffer; +// OBSOLETE +// OBSOLETE data_count += section_size; +// OBSOLETE +// OBSOLETE printf_filtered ("Loading section %s, size 0x%lx lma ", +// OBSOLETE bfd_section_name (abfd, s), section_size); +// OBSOLETE print_address_numeric (section_base, 1, gdb_stdout); +// OBSOLETE printf_filtered ("\n"); +// OBSOLETE gdb_flush (gdb_stdout); +// OBSOLETE } +// OBSOLETE /* Finally, make the PC point at the start address */ +// OBSOLETE write_pc (bfd_get_start_address (abfd)); +// OBSOLETE report_transfer_performance (data_count, start_time, end_time); +// OBSOLETE printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd)); +// OBSOLETE } +// OBSOLETE inferior_ptid = null_ptid; /* No process now */ +// OBSOLETE +// OBSOLETE /* This is necessary because many things were based on the PC at the +// OBSOLETE time that we attached to the monitor, which is no longer valid +// OBSOLETE now that we have loaded new code (and just changed the PC). +// OBSOLETE Another way to do this might be to call normal_stop, except that +// OBSOLETE the stack may not be valid, and things would get horribly +// OBSOLETE confused... */ +// OBSOLETE +// OBSOLETE clear_symtab_users (); +// OBSOLETE } +// OBSOLETE +// OBSOLETE void +// OBSOLETE _initialize_m32r_rom (void) +// OBSOLETE { +// OBSOLETE /* Initialize m32r RevC monitor target */ +// OBSOLETE init_m32r_cmds (); +// OBSOLETE init_monitor_ops (&m32r_ops); +// OBSOLETE +// OBSOLETE m32r_ops.to_shortname = "m32r"; +// OBSOLETE m32r_ops.to_longname = "m32r monitor"; +// OBSOLETE m32r_ops.to_load = m32r_load_gen; /* monitor lacks a download command */ +// OBSOLETE m32r_ops.to_doc = "Debug via the m32r monitor.\n\ +// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya)."; +// OBSOLETE m32r_ops.to_open = m32r_open; +// OBSOLETE add_target (&m32r_ops); +// OBSOLETE +// OBSOLETE /* Initialize mon2000 monitor target */ +// OBSOLETE init_mon2000_cmds (); +// OBSOLETE init_monitor_ops (&mon2000_ops); +// OBSOLETE +// OBSOLETE mon2000_ops.to_shortname = "mon2000"; +// OBSOLETE mon2000_ops.to_longname = "Mon2000 monitor"; +// OBSOLETE mon2000_ops.to_load = m32r_load_gen; /* monitor lacks a download command */ +// OBSOLETE mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\ +// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya)."; +// OBSOLETE mon2000_ops.to_open = mon2000_open; +// OBSOLETE add_target (&mon2000_ops); +// OBSOLETE +// OBSOLETE add_show_from_set +// OBSOLETE (add_set_cmd ("download-path", class_obscure, var_string, +// OBSOLETE (char *) &download_path, +// OBSOLETE "Set the default path for downloadable SREC files.", +// OBSOLETE &setlist), +// OBSOLETE &showlist); +// OBSOLETE +// OBSOLETE add_show_from_set +// OBSOLETE (add_set_cmd ("board-address", class_obscure, var_string, +// OBSOLETE (char *) &board_addr, +// OBSOLETE "Set IP address for M32R-EVA target board.", +// OBSOLETE &setlist), +// OBSOLETE &showlist); +// OBSOLETE +// OBSOLETE add_show_from_set +// OBSOLETE (add_set_cmd ("server-address", class_obscure, var_string, +// OBSOLETE (char *) &server_addr, +// OBSOLETE "Set IP address for download server (GDB's host computer).", +// OBSOLETE &setlist), +// OBSOLETE &showlist); +// OBSOLETE +// OBSOLETE add_com ("upload", class_obscure, m32r_upload_command, +// OBSOLETE "Upload the srec file via the monitor's Ethernet upload capability."); +// OBSOLETE +// OBSOLETE add_com ("tload", class_obscure, m32r_load, "test upload command."); +// OBSOLETE } |