1 /* Remote debugging interface for Hitachi E7000 ICE, for GDB
2 Copyright 1993 Free Software Foundation, Inc.
3 Contributed by Cygnus Support.
5 Written by Steve Chamberlain for Cygnus Support.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
31 #include <sys/types.h>
35 /* The E7000 is an in-circuit emulator for the Hitachi H8/300-H and
36 Hitachi-SH processor. It has serial port and a lan port.
38 The monitor command set makes it difficult to load large ammounts of
39 data over the lan without using ftp - so try not to issue load
40 commands when communicating over ethernet; use the ftpload command.
42 The monitor pauses for a second when dumping srecords to the serial
43 line too, so we use a slower per byte mechanism but without the
44 startup overhead. Even so, it's pretty slow... */
46 int using_tcp; /* nonzero if using the tcp serial driver */
48 extern struct target_ops e7000_ops; /* Forward declaration */
54 char *ENQSTRING = "\005";
58 static void e7000_close ();
59 static void e7000_fetch_register ();
60 static void e7000_store_register ();
62 static int timeout = 5;
64 static void expect PARAMS ((char *));
65 static void expect_full_prompt PARAMS (());
66 static void expect_prompt PARAMS (());
67 static serial_t e7000_desc;
70 /* Send data to e7000debug. Works just like printf. */
73 printf_e7000debug (va_alist)
82 pattern = va_arg (args, char *);
84 vsprintf (buf, pattern, args);
88 printf_e7000debug(a,b,c,d,e)
91 sprintf(buf, a,b,c,d,e);
93 if (SERIAL_WRITE (e7000_desc, buf, strlen (buf)))
94 fprintf (stderr, "SERIAL_WRITE failed: %s\n", safe_strerror (errno));
96 /* And expect to see it echoed */
105 SERIAL_WRITE (e7000_desc, b, 1);
112 SERIAL_WRITE (e7000_desc, s, strlen (s));
115 /* Read a character from the remote system, doing all the fancy timeout
125 c = SERIAL_READCHAR (e7000_desc, timeout);
128 if (c == SERIAL_TIMEOUT)
131 return c; /* Polls shouldn't generate timeout errors */
133 error ("Timeout reading from remote system.");
139 /* Scan input from the remote system, until STRING is found. If DISCARD is
140 non-zero, then discard non-matching input, else print it out.
141 Let the user break out immediately. */
152 c = readchar (timeout);
158 putchar_e7000(CTRLC);
167 if (c == SERIAL_ERROR)
169 error ("Serial communication error");
191 /* Keep discarding input until we see the e7000 prompt.
193 The convention for dealing with the prompt is that you
195 o *then* wait for the prompt.
197 Thus the last thing that a procedure does with the serial line
198 will be an expect_prompt(). Exception: e7000_resume does not
199 wait for the prompt, because the terminal is being handed over
200 to the inferior. However, the next thing which happens after that
201 is a e7000_wait which does wait for the prompt.
202 Note that this includes abnormal exit, e.g. error(). This is
203 necessary to prevent getting into states from which we can't
211 expect_full_prompt ()
219 if (ch >= '0' && ch <= '9')
221 else if (ch >= 'A' && ch <= 'F')
222 return ch - 'A' + 10;
223 else if (ch >= 'a' && ch <= 'f')
224 return ch - 'a' + 10;
235 int value = get_hex_digit (*start);
238 *start = readchar (timeout);
239 while ((try = get_hex_digit (*start)) >= 0)
243 *start = readchar (timeout);
248 /* Get N 32-bit words from remote, each preceded by a space,
249 and put them in registers starting at REGNO. */
252 get_hex_regs (n, regno)
259 for (i = 0; i < n; i++)
264 for (j = 0; j < 8; j++)
265 val = (val << 4) + get_hex_digit (j == 0);
266 supply_register (regno++, (char *) &val);
270 /* This is called not only when we first attach, but also when the
271 user types "run" after having attached. */
273 e7000_create_inferior (execfile, args, env)
281 error ("Can't pass arguments to remote E7000DEBUG process");
283 if (execfile == 0 || exec_bfd == 0)
284 error ("No exec file specified");
286 entry_pt = (int) bfd_get_start_address (exec_bfd);
288 #ifdef CREATE_INFERIOR_HOOK
289 CREATE_INFERIOR_HOOK (0); /* No process-ID */
292 /* The "process" (board) is already stopped awaiting our commands, and
293 the program is already downloaded. We just set its PC and go. */
295 clear_proceed_status ();
297 /* Tell wait_for_inferior that we've started a new process. */
298 init_wait_for_inferior ();
300 /* Set up the "saved terminal modes" of the inferior
301 based on what modes we are starting it with. */
302 target_terminal_init ();
304 /* Install inferior's terminal modes. */
305 target_terminal_inferior ();
307 /* insert_step_breakpoint (); FIXME, do we need this? */
308 proceed ((CORE_ADDR) entry_pt, -1, 0); /* Let 'er rip... */
311 /* Open a connection to a remote debugger.
312 NAME is the filename used for communication. */
314 static int baudrate = 9600;
315 static char dev_name[100];
317 static char *machine = "";
318 static char *user = "";
319 static char *passwd = "";
320 static char *dir = "";
322 /* Grab the next token and buy some space for it */
331 while (*p && *p == ' ')
336 while (*p && (*p != ' ' && *p != '\t'))
349 e7000_login (args, from_tty)
355 machine = next (&args);
357 passwd = next (&args);
361 printf ("Set info to %s %s %s %s\n", machine, user, passwd, dir);
366 error ("Syntax is ftplogin <machine> <user> <passwd> <directory>");
370 /* Start an ftp transfer from the E7000 to a host */
373 e7000_ftp (args, from_tty)
377 int oldtimeout = timeout;
379 printf_e7000debug ("ftp %s\r", machine);
380 expect (" Username : ");
381 printf_e7000debug ("%s\r", user);
382 expect (" Password : ");
383 write_e7000 (passwd);
385 expect ("success\r");
387 printf_e7000debug ("cd %s\r", dir);
389 printf_e7000debug ("ll 0;s:%s\r", args);
391 printf_e7000debug ("bye\r");
393 timeout = oldtimeout;
397 e7000_open (args, from_tty)
404 target_preopen (from_tty);
407 n = sscanf (args, " %s %d %s", dev_name, &baudrate, junk);
410 if (n != 1 && n != 2)
411 error ("Bad arguments. Usage:\ttarget e7000 <device> <speed>\n\
412 or \t\ttarget e7000 <host>[:<port>]\n");
414 if (n == 1 && strchr (dev_name, ':') == 0)
416 /* Default to normal telnet port */
417 strcat (dev_name, ":23");
420 push_target (&e7000_ops);
421 e7000_desc = SERIAL_OPEN (dev_name);
425 perror_with_name (dev_name);
427 using_tcp = strcmp (e7000_desc->ops->name, "tcp") == 0;
429 SERIAL_SETBAUDRATE (e7000_desc, baudrate);
430 SERIAL_RAW (e7000_desc);
432 /* Hello? Are you there? */
434 putchar_e7000 (CTRLC);
439 printf_unfiltered ("[waiting for e7000...]\n");
440 write_e7000 ("\r\n");
441 c = SERIAL_READCHAR (e7000_desc, 3);
442 while (c != SERIAL_TIMEOUT)
445 if (from_tty && c != '\r')
454 c = SERIAL_READCHAR (e7000_desc, 3);
457 putchar_e7000 (CTRLC);
462 printf_e7000debug ("\r\n");
466 printf_filtered ("Remote %s connected to %s\n", target_shortname,
469 #ifdef GDB_TARGET_IS_H8300
474 /* Close out all files and local state before this target loses control. */
477 e7000_close (quitting)
482 SERIAL_CLOSE (e7000_desc);
487 /* Terminate the open connection to the remote debugger.
488 Use this when you want to detach and do something else
491 e7000_detach (from_tty)
494 pop_target (); /* calls e7000_close to do the real work */
496 printf ("Ending remote %s debugging\n", target_shortname);
499 /* Tell the remote machine to resume. */
502 e7000_resume (pid, step, sig)
507 printf_e7000debug ("S\r");
511 printf_e7000debug ("G\r");
515 /* Read the remote registers into the block REGS.
517 For the H8/300 a register dump looks like:
520 PC=00021A CCR=80:I*******
521 ER0 - ER3 0000000A 0000002E 0000002E 00000000
522 ER4 - ER7 00000000 00000000 00000000 00FFEFF6
528 #ifdef GDB_TARGET_IS_H8300
531 ER0 - ER3 %0 %1 %2 %3\n\
532 ER4 - ER7 %4 %5 %6 %7\n";
534 char *want_nopc = "%p CCR=%c\n\
535 ER0 - ER3 %0 %1 %2 %3\n\
536 ER4 - ER7 %4 %5 %6 %7";
540 #ifdef GDB_TARGET_IS_SH
541 char *want = "\n PC=%16 SR=%22\n\
542 PR=%17 GBR=%18 VBR=%19\n\
544 R0-7 %0 %1 %2 %3 %4 %5 %6 %7\n\
545 R8-15 %8 %9 %10 %11 %12 %13 %14 %15\n";
547 char *want_nopc = "%16 SR=%22\n\
548 PR=%17 GBR=%18 VBR=%19\n\
550 R0-7 %0 %1 %2 %3 %4 %5 %6 %7\n\
551 R8-15 %8 %9 %10 %11 %12 %13 %14 %15";
560 int c = readchar (timeout);
576 int high = get_hex_digit (gch ());
577 int low = get_hex_digit (gch ());
578 return (high << 4) + low;
582 fetch_regs_from_dump (nextchar, want)
587 char buf[MAX_REGISTER_RAW_SIZE];
589 int thischar = nextchar();
596 while (thischar != '\n')
597 thischar = nextchar();
598 thischar = nextchar();
599 while (thischar == '\r')
600 thischar = nextchar();
605 while (thischar == ' ' || thischar == '\t' || thischar == '\r' || thischar == '\n')
606 thischar = nextchar();
611 if (*want == thischar)
615 thischar = nextchar();
618 else if (thischar == ' ')
620 thischar = nextchar();
623 error("out of sync in fetch registers");
628 /* Got a register command */
659 if (isdigit(want[0]))
661 if (isdigit(want[1]))
663 regno = (want[0] - '0') * 10 + want[1] - '0';
668 regno = want[0] - '0';
676 store_signed_integer (buf,
677 REGISTER_RAW_SIZE(regno),
678 (LONGEST)get_hex(&thischar, nextchar));
679 supply_register (regno, buf);
686 e7000_fetch_registers ()
690 printf_e7000debug ("R\r");
691 fetch_regs_from_dump (gch, want);
693 /* And supply the extra ones the simulator uses */
694 for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
697 supply_register (regno, (char *) (&buf));
701 /* Fetch register REGNO, or all registers if REGNO is -1.
702 Returns errno value. */
706 e7000_fetch_register (regno)
709 e7000_fetch_registers ();
712 /* Store the remote registers from the contents of the block REGS. */
715 e7000_store_registers ()
719 for (regno = 0; regno < NUM_REALREGS; regno++)
720 e7000_store_register (regno);
722 registers_changed ();
725 /* Store register REGNO, or all if REGNO == 0.
726 Return errno value. */
728 e7000_store_register (regno)
733 e7000_store_registers ();
736 #ifdef GDB_TARGET_IS_H8300
739 printf_e7000debug (".ER%d %x\r", regno,
740 read_register (regno));
743 else if (regno == PC_REGNUM)
745 printf_e7000debug (".PC %x\r",
746 read_register (regno));
748 else if (regno == CCR_REGNUM)
750 printf_e7000debug (".CCR %x\r",
751 read_register (regno));
755 #ifdef GDB_TARGET_IS_SH
759 printf_e7000debug (".R%d %x\r", regno,
760 read_register (regno));
764 printf_e7000debug (".PC %x\r",
765 read_register (regno));
768 printf_e7000debug (".SR %x\r",
769 read_register (regno));
773 printf_e7000debug (".PR %x\r",
774 read_register (regno));
778 printf_e7000debug (".GBR %x\r",
779 read_register (regno));
783 printf_e7000debug (".VBR %x\r",
784 read_register (regno));
788 printf_e7000debug (".MACH %x\r",
789 read_register (regno));
793 printf_e7000debug (".MACL %x\r",
794 read_register (regno));
802 /* Get ready to modify the registers array. On machines which store
803 individual registers, this doesn't need to do anything. On machines
804 which store all the registers in one fell swoop, this makes sure
805 that registers contains all the registers from the program being
809 e7000_prepare_to_store ()
811 /* Do nothing, since we can store individual regs */
817 printf ("\tAttached to %s at %d baud.\n",
823 stickbyte (where, what)
827 static CONST char digs[] = "0123456789ABCDEF";
828 where[0] = digs[(what >> 4) & 0xf];
829 where[1] = digs[(what & 0xf) & 0xf];
833 /* Write a small ammount of memory */
835 write_small (memaddr, myaddr, len)
837 unsigned char *myaddr;
841 for (i = 0; i < len; i++)
843 if (((memaddr + i) & 3) == 0
846 /* Can be done with a long word */
847 printf_e7000debug ("m %x %x%02x%02x%02x;l\r",
857 printf_e7000debug ("m %x %x\r", memaddr + i, myaddr[i]);
863 /* Write a large ammount of memory, this only works with the serial mode enabled.
878 write_large (memaddr, myaddr, len)
880 unsigned char *myaddr;
885 #define maxstride 128
888 printf_e7000debug ("IL ;S:FK\r");
892 for (i = 0; i < len; i += stride)
894 char compose[maxstride * 2 + 50];
895 int address = i + memaddr;
901 if (stride > maxstride)
904 compose[where++] = 'S';
906 if (address >= 0xffffff)
910 else if (address >= 0xffff)
916 compose[where++] = alen - 1 + '0'; /* insert type */
917 check_sum += stickbyte (compose + where, alen + stride + 1); /* Insert length */
922 check_sum += stickbyte (compose + where, address >> (8 * (alen)));
926 for (j = 0; j < stride; j++)
928 check_sum += stickbyte (compose + where, myaddr[i + j]);
932 stickbyte (compose + where, ~check_sum);
935 compose[where++] = '\r';
936 compose[where++] = '\n';
937 compose[where++] = 0;
940 for (z = compose; *z; z++) ;
942 SERIAL_WRITE (e7000_desc, compose, where);
943 j = SERIAL_READCHAR (e7000_desc, 0);
944 if (j == SERIAL_TIMEOUT)
946 /* This is ok - nothing there */
950 /* Hmm, it's trying to tell us something */
952 error ("Error writing memory");
957 while ((j = SERIAL_READCHAR(e7000_desc,0)) > 0)
965 /* Send the trailer record */
966 write_e7000 ("S70500000000FA\r");
967 putchar_e7000 (CTRLZ);
974 /* Copy LEN bytes of data from debugger memory at MYADDR
975 to inferior's memory at MEMADDR. Returns length moved.
977 Can't use the Srecord load over ethernet, so dont use
981 e7000_write_inferior_memory (memaddr, myaddr, len)
983 unsigned char *myaddr;
986 if (len < 16 || using_tcp)
988 return write_small (memaddr, myaddr, len);
992 return write_large (memaddr, myaddr, len);
997 /* Read LEN bytes from inferior memory at MEMADDR. Put the result
998 at debugger address MYADDR. Returns length moved.
1001 Small transactions we send
1009 e7000_read_inferior_memory (memaddr, myaddr, len)
1011 unsigned char *myaddr;
1017 /* Starting address of this pass. */
1019 if (((memaddr - 1) + len) < memaddr)
1025 printf_e7000debug ("m %x;l\r", memaddr);
1027 for (count = 0; count < len; count += 4)
1029 /* Suck away the address */
1035 { /* Some kind of error */
1042 /* Now read in the data */
1043 for (i = 0; i < 4; i++)
1046 if (count + i < len) {
1047 myaddr[count + i] = b;
1051 /* Skip the trailing ? and send a . to end and a cr for more */
1054 if (count + 4 >= len)
1055 printf_e7000debug(".\r");
1057 printf_e7000debug("\r");
1065 For large transfers we used to send
1068 d <addr> <endaddr>\r
1071 <ADDR> < D A T A > < ASCII CODE >
1072 000000 5F FD FD FF DF 7F DF FF 01 00 01 00 02 00 08 04 "_..............."
1073 000010 FF D7 FF 7F D7 F1 7F FF 00 05 00 00 08 00 40 00 "..............@."
1074 000020 7F FD FF F7 7F FF FF F7 00 00 00 00 00 00 00 00 "................"
1076 A cost in chars for each transaction of 80 + 5*n-bytes.
1079 Large transactions could be done with the srecord load code, but
1080 there is a pause for a second before dumping starts, which slows the
1085 e7000_read_inferior_memory (memaddr, myaddr, len)
1087 unsigned char *myaddr;
1093 /* Starting address of this pass. */
1095 if (((memaddr - 1) + len) < memaddr)
1101 printf_e7000debug ("d %x %x\r", memaddr, memaddr + len - 1);
1106 /* First skip the command */
1118 /* Skip the title line */
1124 /* Skip the address */
1130 /* read in the bytes on the line */
1131 while (c != '"' && count < len)
1137 myaddr[count++] = get_hex (&c);
1152 fast_but_for_the_pause_e7000_read_inferior_memory (memaddr, myaddr, len)
1160 if (((memaddr - 1) + len) < memaddr)
1166 printf_e7000debug ("is %x@%x:s\r", memaddr, len);
1172 error ("Memory read error");
1174 putchar_e7000 (ACK);
1186 case ENQ: /* ENQ, at the end */
1190 /* Start of an Srecord */
1195 case '7': /* Termination record, ignore */
1199 /* Header record - ignore it */
1210 alen = type - '0' + 1;
1214 addr = (addr << 8) + gbyte ();
1218 for (i = 0; i < length - 1; i++)
1220 myaddr[i + addr - memaddr] = gbyte ();
1222 gbyte (); /* Ignore checksum */
1227 putchar_e7000 (ACK);
1228 expect ("TOP ADDRESS =");
1229 expect ("END ADDRESS =");
1238 e7000_xfer_inferior_memory (memaddr, myaddr, len, write, target)
1240 unsigned char *myaddr;
1243 struct target_ops *target; /* ignored */
1247 return e7000_write_inferior_memory( memaddr, myaddr, len);
1251 return e7000_read_inferior_memory( memaddr, myaddr, len);
1256 e7000_kill (args, from_tty)
1263 /* Clean up when a program exits.
1265 The program actually lives on in the remote processor's RAM, and may be
1266 run again without a download. Don't leave it full of breakpoint
1270 e7000_mourn_inferior ()
1272 remove_breakpoints ();
1273 unpush_target (&e7000_ops);
1274 generic_mourn_inferior (); /* Do all the proper things now */
1277 #define MAX_E7000DEBUG_BREAKPOINTS 200
1279 extern int memory_breakpoint_size;
1280 static CORE_ADDR breakaddr[MAX_E7000DEBUG_BREAKPOINTS] =
1284 e7000_insert_breakpoint (addr, shadow)
1286 unsigned char *shadow;
1289 static char nop[2] = NOP;
1291 for (i = 0; i <= MAX_E7000DEBUG_BREAKPOINTS; i++)
1292 if (breakaddr[i] == 0)
1294 breakaddr[i] = addr;
1295 /* Save old contents, and insert a nop in the space */
1296 e7000_read_inferior_memory (addr, shadow, 2);
1297 e7000_write_inferior_memory (addr, nop, 2);
1298 printf_e7000debug ("B %x\r", addr);
1303 error("Too many breakpoints ( > %d) for the E7000\n", MAX_E7000DEBUG_BREAKPOINTS);
1308 e7000_remove_breakpoint (addr, shadow)
1310 unsigned char *shadow;
1314 for (i = 0; i < MAX_E7000DEBUG_BREAKPOINTS; i++)
1315 if (breakaddr[i] == addr)
1318 printf_e7000debug ("B - %x\r", addr);
1320 /* Replace the insn under the break */
1321 e7000_write_inferior_memory (addr, shadow, 2);
1325 fprintf (stderr, "Can't find breakpoint associated with 0x%x\n", addr);
1330 /* Put a command string, in args, out to STDBUG. Output from STDBUG is placed
1331 on the users terminal until the prompt is seen. */
1334 e7000_command (args, fromtty)
1340 error ("e7000 target not open.");
1343 printf_e7000debug ("\r");
1347 printf_e7000debug ("%s\r", args);
1351 expect_full_prompt ();
1354 printf_unfiltered ("\n");
1358 e7000_load (args, fromtty)
1362 gr_load_image (args, fromtty);
1366 e7000_drain (args, fromtty)
1372 printf_e7000debug("end\r");
1373 putchar_e7000 (CTRLC);
1374 while ((c = SERIAL_READCHAR (e7000_desc, 1) != SERIAL_TIMEOUT))
1378 putchar_e7000(CTRLC);
1381 if (c > ' ' && c < 127)
1382 printf ("%c", c & 0xff);
1384 printf ("<%x>", c & 0xff);
1392 printf_filtered ("Snoop enabled\n");
1394 printf_filtered ("Snoop disabled\n");
1402 static char *strings[NITEMS] =
1418 for (i = 0; i < NITEMS; i++)
1425 /* found one of the choices */
1437 /* Suck characters, if a string match, then return the strings index
1438 otherwise echo them */
1447 char *buffer = saveaway;
1448 /* Count number of expect strings */
1450 for (n =0; strings[n]; n++)
1452 ptr[n] = strings[n];
1459 c = SERIAL_READCHAR (e7000_desc, 1);
1460 if (c == SERIAL_TIMEOUT) {
1461 printf_unfiltered ("[waiting for e7000...]\n");
1474 putchar_e7000 (CTRLC); /* interrupt the running program */
1478 for (i = 0; i < n; i++)
1485 /* Gone all the way */
1492 ptr[i] = strings[i];
1499 /* Save it up incase we find that there was no match */
1504 if (buffer != saveaway)
1510 if (c != SERIAL_TIMEOUT) {
1518 /* We subtract two from the pc here rather than use DECR_PC_AFTER_BREAK
1519 since the e7000 doesn't always add two to the pc, and the simulators never do. */
1525 store_signed_integer (buf,
1526 REGISTER_RAW_SIZE(PC_REGNUM),
1527 read_register (PC_REGNUM) -2);
1528 supply_register (PC_REGNUM, buf);
1529 printf_e7000debug (".PC %x\r", read_register (PC_REGNUM));
1533 #define WAS_RUNNING 2
1535 static char *estrings[] = { "** SLEEP", "BREAK !", "** PC", "PC", 0};
1537 /* Wait until the remote machine stops, then return,
1538 storing status in STATUS just as `wait' would. */
1541 e7000_wait (pid, status)
1548 int running_count = 0;
1553 WSETSTOP ((*status), 0);
1554 /* Then echo chars until PC= string seen */
1555 gch (); /* Drop cr */
1556 gch (); /* and space */
1559 switch (expect_n(estrings))
1562 /* how did this happen ? */
1567 putchar_e7000 (CTRLC);
1575 if (running_count == 20)
1577 printf_unfiltered ("[running...]\n");
1583 /* Skip till the PC=*/
1585 fetch_regs_from_dump (gch, want_nopc);
1587 /* And supply the extra ones the simulator uses */
1588 for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
1591 supply_register (regno, (char *) &buf);
1594 reset_pc = why_stop ();
1595 expect_full_prompt ();
1599 case 1: /* Breakpoint */
1601 WSETSTOP ((*status), SIGTRAP);
1605 WSETSTOP ((*status), SIGTRAP);
1612 WSETSTOP ((*status), SIGTRAP);
1616 WSETSTOP ((*status), SIGINT);
1623 /* Define the target subroutine names */
1625 struct target_ops e7000_ops =
1628 "Remote Hitachi e7000 target",
1629 "Use a remote Hitachi e7000 ICE connected by a serial line,\n\
1630 or a network connection.\n\
1631 Arguments are the name of the device for the serial line,\n\
1632 the speed to connect at in bits per second.\n\
1634 target e7000 /dev/ttya 9600\n\
1635 target e7000 foobar",
1642 e7000_fetch_register,
1643 e7000_store_register,
1644 e7000_prepare_to_store,
1645 e7000_xfer_inferior_memory,
1647 0,0,/* e7000_insert_breakpoint,
1648 e7000_remove_breakpoint, /* Breakpoints */
1653 0, /* Terminal handling */
1655 e7000_load, /* load */
1656 0, /* lookup_symbol */
1657 e7000_create_inferior,
1658 e7000_mourn_inferior,
1660 0, /* notice_signals */
1667 1, /* all mem, mem, stack, regs, exec */
1669 0, /* Section pointers */
1670 OPS_MAGIC, /* Always the last thing */
1674 _initialize_remote_e7000 ()
1676 add_target (&e7000_ops);
1677 add_com ("e7000 <command>", class_obscure, e7000_command,
1678 "Send a command to the e7000 monitor.");
1680 add_com ("ftplogin <machine> <name> <passwd> <dir>", class_obscure, e7000_login,
1681 "Login to machine and change to directory.");
1683 add_com ("ftpload <file>", class_obscure, e7000_ftp,
1684 "Fetch and load a file from previously described place.");
1686 add_com ("drain", class_obscure, e7000_drain,
1687 "Drain pending e7000 text buffers.");
1688 add_com ("snoop", class_obscure, e7000_noecho, "Toggle monitor echo.");