1 /* Remote debugging interface to m32r and mon2000 ROM monitors for GDB,
3 Copyright 1996 Free Software Foundation, Inc.
5 Adapted by Michael Snyder of 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., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* This module defines communication with the Mitsubishi m32r monitor */
34 #include "symfile.h" /* for generic load */
35 #include <time.h> /* for time_t */
36 #include "gdb_string.h"
37 #include "objfiles.h" /* for ALL_OBJFILES etc. */
40 extern void report_transfer_performance
PARAMS ((unsigned long, time_t, time_t));
44 * All this stuff just to get my host computer's IP address!
46 #include <sys/types.h>
47 #include <netdb.h> /* for hostent */
48 #include <netinet/in.h> /* for struct in_addr */
50 #include <arpa/inet.h> /* for inet_ntoa */
54 static char *board_addr
; /* user-settable IP address for M32R-EVA */
55 static char *server_addr
; /* user-settable IP address for gdb host */
56 static char *download_path
; /* user-settable path for SREC files */
60 * Function: m32r_load_1 (helper function)
64 m32r_load_section (abfd
, s
, data_count
)
67 unsigned int *data_count
;
69 if (s
->flags
& SEC_LOAD
)
71 bfd_size_type section_size
= bfd_section_size (abfd
, s
);
72 bfd_vma section_base
= bfd_section_lma (abfd
, s
);
73 unsigned int buffer
, i
;
75 *data_count
+= section_size
;
77 printf_filtered ("Loading section %s, size 0x%lx lma ",
78 bfd_section_name (abfd
, s
), section_size
);
79 print_address_numeric (section_base
, 1, gdb_stdout
);
80 printf_filtered ("\n");
81 gdb_flush (gdb_stdout
);
82 monitor_printf ("%x mw\r", section_base
);
83 for (i
= 0; i
< section_size
; i
+= 4)
86 monitor_expect (" -> ", NULL
, 0);
87 bfd_get_section_contents (abfd
, s
, (char *) &buffer
, i
, 4);
88 monitor_printf ("%x\n", buffer
);
90 monitor_expect (" -> ", NULL
, 0);
91 monitor_printf ("q\n");
92 monitor_expect_prompt (NULL
, 0);
102 bfd_map_over_sections ((bfd
*) dummy
, m32r_load_section
, &data_count
);
107 * Function: m32r_load (an alternate way to load)
111 m32r_load (filename
, from_tty
)
115 extern int inferior_pid
;
118 unsigned int i
, data_count
= 0;
119 time_t start_time
, end_time
; /* for timing of download */
121 if (filename
== NULL
|| filename
[0] == 0)
122 filename
= get_exec_file (1);
124 abfd
= bfd_openr (filename
, 0);
126 error ("Unable to open file %s\n", filename
);
127 if (bfd_check_format (abfd
, bfd_object
) == 0)
128 error ("File is not an object file\n");
129 start_time
= time (NULL
);
131 for (s
= abfd
->sections
; s
; s
= s
->next
)
132 if (s
->flags
& SEC_LOAD
)
134 bfd_size_type section_size
= bfd_section_size (abfd
, s
);
135 bfd_vma section_base
= bfd_section_vma (abfd
, s
);
138 data_count
+= section_size
;
140 printf_filtered ("Loading section %s, size 0x%lx vma ",
141 bfd_section_name (abfd
, s
), section_size
);
142 print_address_numeric (section_base
, 1, gdb_stdout
);
143 printf_filtered ("\n");
144 gdb_flush (gdb_stdout
);
145 monitor_printf ("%x mw\r", section_base
);
146 for (i
= 0; i
< section_size
; i
+= 4)
148 monitor_expect (" -> ", NULL
, 0);
149 bfd_get_section_contents (abfd
, s
, (char *) &buffer
, i
, 4);
150 monitor_printf ("%x\n", buffer
);
152 monitor_expect (" -> ", NULL
, 0);
153 monitor_printf ("q\n");
154 monitor_expect_prompt (NULL
, 0);
157 if (!(catch_errors (m32r_load_1
, abfd
, "Load aborted!\n", RETURN_MASK_ALL
)))
159 monitor_printf ("q\n");
163 end_time
= time (NULL
);
164 printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd
));
165 report_transfer_performance (data_count
, start_time
, end_time
);
167 /* Finally, make the PC point at the start address */
169 write_pc (bfd_get_start_address (exec_bfd
));
171 inferior_pid
= 0; /* No process now */
173 /* This is necessary because many things were based on the PC at the
174 time that we attached to the monitor, which is no longer valid
175 now that we have loaded new code (and just changed the PC).
176 Another way to do this might be to call normal_stop, except that
177 the stack may not be valid, and things would get horribly
180 clear_symtab_users ();
184 m32r_load_gen (filename
, from_tty
)
188 generic_load (filename
, from_tty
);
191 static void m32r_open
PARAMS ((char *args
, int from_tty
));
192 static void mon2000_open
PARAMS ((char *args
, int from_tty
));
194 /* This array of registers needs to match the indexes used by GDB. The
195 whole reason this exists is because the various ROM monitors use
196 different names than GDB does, and don't support all the registers
197 either. So, typing "info reg sp" becomes an "A7". */
199 static char *m32r_regnames
[] =
200 {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
201 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
202 "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
206 m32r_supply_register (regname
, regnamelen
, val
, vallen
)
213 int num_regs
= sizeof (m32r_regnames
) / sizeof (m32r_regnames
[0]);
215 for (regno
= 0; regno
< num_regs
; regno
++)
216 if (strncmp (regname
, m32r_regnames
[regno
], regnamelen
) == 0)
219 if (regno
>= num_regs
)
220 return; /* no match */
222 if (regno
== ACCL_REGNUM
)
223 { /* special handling for 64-bit acc reg */
224 monitor_supply_register (ACCH_REGNUM
, val
);
225 val
= strchr (val
, ':'); /* skip past ':' to get 2nd word */
227 monitor_supply_register (ACCL_REGNUM
, val
+ 1);
231 monitor_supply_register (regno
, val
);
232 if (regno
== PSW_REGNUM
)
234 unsigned long psw
= strtoul (val
, NULL
, 16);
235 char *zero
= "00000000", *one
= "00000001";
239 monitor_supply_register (SM_REGNUM
, (psw
& 0x80) ? one
: zero
);
242 /* Backup stack mode bit */
243 monitor_supply_register (BSM_REGNUM
, (psw
& 0x8000) ? one
: zero
);
246 /* Interrupt enable bit */
247 monitor_supply_register (IE_REGNUM
, (psw
& 0x40) ? one
: zero
);
250 /* Backup interrupt enable bit */
251 monitor_supply_register (BIE_REGNUM
, (psw
& 0x4000) ? one
: zero
);
254 /* Condition bit (carry etc.) */
255 monitor_supply_register (COND_REGNUM
, (psw
& 0x1) ? one
: zero
);
258 monitor_supply_register (CBR_REGNUM
, (psw
& 0x1) ? one
: zero
);
261 monitor_supply_register (BPC_REGNUM
, zero
); /* KLUDGE: (???????) */
264 monitor_supply_register (BCARRY_REGNUM
, zero
); /* KLUDGE: (??????) */
268 if (regno
== SPI_REGNUM
|| regno
== SPU_REGNUM
)
269 { /* special handling for stack pointer (spu or spi) */
270 unsigned long stackmode
= read_register (PSW_REGNUM
) & 0x80;
272 if (regno
== SPI_REGNUM
&& !stackmode
) /* SP == SPI */
273 monitor_supply_register (SP_REGNUM
, val
);
274 else if (regno
== SPU_REGNUM
&& stackmode
) /* SP == SPU */
275 monitor_supply_register (SP_REGNUM
, val
);
280 /* m32r RevC board monitor */
282 static struct target_ops m32r_ops
;
284 static char *m32r_inits
[] =
287 static struct monitor_ops m32r_cmds
;
290 init_m32r_cmds (void)
292 m32r_cmds
.flags
= MO_CLR_BREAK_USES_ADDR
| MO_REGISTER_VALUE_FIRST
;
293 m32r_cmds
.init
= m32r_inits
; /* Init strings */
294 m32r_cmds
.cont
= "go\r"; /* continue command */
295 m32r_cmds
.step
= "step\r"; /* single step */
296 m32r_cmds
.stop
= NULL
; /* interrupt command */
297 m32r_cmds
.set_break
= "%x +bp\r"; /* set a breakpoint */
298 m32r_cmds
.clr_break
= "%x -bp\r"; /* clear a breakpoint */
299 m32r_cmds
.clr_all_break
= "bpoff\r"; /* clear all breakpoints */
300 m32r_cmds
.fill
= "%x %x %x fill\r"; /* fill (start length val) */
301 m32r_cmds
.setmem
.cmdb
= "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
302 m32r_cmds
.setmem
.cmdw
= "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */
303 m32r_cmds
.setmem
.cmdl
= "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */
304 m32r_cmds
.setmem
.cmdll
= NULL
; /* setmem.cmdll (addr, value) */
305 m32r_cmds
.setmem
.resp_delim
= NULL
; /* setmem.resp_delim */
306 m32r_cmds
.setmem
.term
= NULL
; /* setmem.term */
307 m32r_cmds
.setmem
.term_cmd
= NULL
; /* setmem.term_cmd */
308 m32r_cmds
.getmem
.cmdb
= "%x %x dump\r"; /* getmem.cmdb (addr, len) */
309 m32r_cmds
.getmem
.cmdw
= NULL
; /* getmem.cmdw (addr, len) */
310 m32r_cmds
.getmem
.cmdl
= NULL
; /* getmem.cmdl (addr, len) */
311 m32r_cmds
.getmem
.cmdll
= NULL
; /* getmem.cmdll (addr, len) */
312 m32r_cmds
.getmem
.resp_delim
= ": "; /* getmem.resp_delim */
313 m32r_cmds
.getmem
.term
= NULL
; /* getmem.term */
314 m32r_cmds
.getmem
.term_cmd
= NULL
; /* getmem.term_cmd */
315 m32r_cmds
.setreg
.cmd
= "%x to %%%s\r"; /* setreg.cmd (name, value) */
316 m32r_cmds
.setreg
.resp_delim
= NULL
; /* setreg.resp_delim */
317 m32r_cmds
.setreg
.term
= NULL
; /* setreg.term */
318 m32r_cmds
.setreg
.term_cmd
= NULL
; /* setreg.term_cmd */
319 m32r_cmds
.getreg
.cmd
= NULL
; /* getreg.cmd (name) */
320 m32r_cmds
.getreg
.resp_delim
= NULL
; /* getreg.resp_delim */
321 m32r_cmds
.getreg
.term
= NULL
; /* getreg.term */
322 m32r_cmds
.getreg
.term_cmd
= NULL
; /* getreg.term_cmd */
323 m32r_cmds
.dump_registers
= ".reg\r"; /* dump_registers */
324 m32r_cmds
.register_pattern
= "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
325 m32r_cmds
.supply_register
= m32r_supply_register
; /* supply_register */
326 m32r_cmds
.load_routine
= NULL
; /* load_routine (defaults to SRECs) */
327 m32r_cmds
.load
= NULL
; /* download command */
328 m32r_cmds
.loadresp
= NULL
; /* load response */
329 m32r_cmds
.prompt
= "ok "; /* monitor command prompt */
330 m32r_cmds
.line_term
= "\r"; /* end-of-line terminator */
331 m32r_cmds
.cmd_end
= NULL
; /* optional command terminator */
332 m32r_cmds
.target
= &m32r_ops
; /* target operations */
333 m32r_cmds
.stopbits
= SERIAL_1_STOPBITS
; /* number of stop bits */
334 m32r_cmds
.regnames
= m32r_regnames
; /* registers names */
335 m32r_cmds
.magic
= MONITOR_OPS_MAGIC
; /* magic */
336 } /* init_m32r_cmds */
339 m32r_open (args
, from_tty
)
343 monitor_open (args
, &m32r_cmds
, from_tty
);
346 /* Mon2000 monitor (MSA2000 board) */
348 static struct target_ops mon2000_ops
;
349 static struct monitor_ops mon2000_cmds
;
352 init_mon2000_cmds (void)
354 mon2000_cmds
.flags
= MO_CLR_BREAK_USES_ADDR
| MO_REGISTER_VALUE_FIRST
;
355 mon2000_cmds
.init
= m32r_inits
; /* Init strings */
356 mon2000_cmds
.cont
= "go\r"; /* continue command */
357 mon2000_cmds
.step
= "step\r"; /* single step */
358 mon2000_cmds
.stop
= NULL
; /* interrupt command */
359 mon2000_cmds
.set_break
= "%x +bp\r"; /* set a breakpoint */
360 mon2000_cmds
.clr_break
= "%x -bp\r"; /* clear a breakpoint */
361 mon2000_cmds
.clr_all_break
= "bpoff\r"; /* clear all breakpoints */
362 mon2000_cmds
.fill
= "%x %x %x fill\r"; /* fill (start length val) */
363 mon2000_cmds
.setmem
.cmdb
= "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
364 mon2000_cmds
.setmem
.cmdw
= "%x 1 %x fillh\r"; /* setmem.cmdw (addr, value) */
365 mon2000_cmds
.setmem
.cmdl
= "%x 1 %x fillw\r"; /* setmem.cmdl (addr, value) */
366 mon2000_cmds
.setmem
.cmdll
= NULL
; /* setmem.cmdll (addr, value) */
367 mon2000_cmds
.setmem
.resp_delim
= NULL
; /* setmem.resp_delim */
368 mon2000_cmds
.setmem
.term
= NULL
; /* setmem.term */
369 mon2000_cmds
.setmem
.term_cmd
= NULL
; /* setmem.term_cmd */
370 mon2000_cmds
.getmem
.cmdb
= "%x %x dump\r"; /* getmem.cmdb (addr, len) */
371 mon2000_cmds
.getmem
.cmdw
= NULL
; /* getmem.cmdw (addr, len) */
372 mon2000_cmds
.getmem
.cmdl
= NULL
; /* getmem.cmdl (addr, len) */
373 mon2000_cmds
.getmem
.cmdll
= NULL
; /* getmem.cmdll (addr, len) */
374 mon2000_cmds
.getmem
.resp_delim
= ": "; /* getmem.resp_delim */
375 mon2000_cmds
.getmem
.term
= NULL
; /* getmem.term */
376 mon2000_cmds
.getmem
.term_cmd
= NULL
; /* getmem.term_cmd */
377 mon2000_cmds
.setreg
.cmd
= "%x to %%%s\r"; /* setreg.cmd (name, value) */
378 mon2000_cmds
.setreg
.resp_delim
= NULL
; /* setreg.resp_delim */
379 mon2000_cmds
.setreg
.term
= NULL
; /* setreg.term */
380 mon2000_cmds
.setreg
.term_cmd
= NULL
; /* setreg.term_cmd */
381 mon2000_cmds
.getreg
.cmd
= NULL
; /* getreg.cmd (name) */
382 mon2000_cmds
.getreg
.resp_delim
= NULL
; /* getreg.resp_delim */
383 mon2000_cmds
.getreg
.term
= NULL
; /* getreg.term */
384 mon2000_cmds
.getreg
.term_cmd
= NULL
; /* getreg.term_cmd */
385 mon2000_cmds
.dump_registers
= ".reg\r"; /* dump_registers */
386 mon2000_cmds
.register_pattern
= "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
387 mon2000_cmds
.supply_register
= m32r_supply_register
; /* supply_register */
388 mon2000_cmds
.load_routine
= NULL
; /* load_routine (defaults to SRECs) */
389 mon2000_cmds
.load
= NULL
; /* download command */
390 mon2000_cmds
.loadresp
= NULL
; /* load response */
391 mon2000_cmds
.prompt
= "Mon2000>"; /* monitor command prompt */
392 mon2000_cmds
.line_term
= "\r"; /* end-of-line terminator */
393 mon2000_cmds
.cmd_end
= NULL
; /* optional command terminator */
394 mon2000_cmds
.target
= &mon2000_ops
; /* target operations */
395 mon2000_cmds
.stopbits
= SERIAL_1_STOPBITS
; /* number of stop bits */
396 mon2000_cmds
.regnames
= m32r_regnames
; /* registers names */
397 mon2000_cmds
.magic
= MONITOR_OPS_MAGIC
; /* magic */
398 } /* init_mon2000_cmds */
401 mon2000_open (args
, from_tty
)
405 monitor_open (args
, &mon2000_cmds
, from_tty
);
410 /* Function: set_board_address
411 Tell the BootOne monitor what it's ethernet IP address is. */
414 m32r_set_board_address (args
, from_tty
)
423 monitor_printf ("ulip %s\n", args
);
424 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
));
425 /* now parse the result for success */
428 error ("Requires argument (IP address for M32R-EVA board)");
431 /* Function: set_server_address
432 Tell the BootOne monitor what gdb's ethernet IP address is. */
435 m32r_set_server_address (args
, from_tty
)
444 monitor_printf ("uhip %s\n", args
);
445 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
));
446 /* now parse the result for success */
449 error ("Requires argument (IP address of GDB's host computer)");
452 /* Function: set_download_path
453 Tell the BootOne monitor the default path for downloadable SREC files. */
456 m32r_set_download_path (args
, from_tty
)
465 monitor_printf ("up %s\n", args
);
466 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
));
467 /* now parse the result for success */
470 error ("Requires argument (default path for downloadable SREC files)");
474 m32r_upload_command (args
, from_tty
)
480 time_t start_time
, end_time
; /* for timing of download */
481 extern int inferior_pid
;
482 int resp_len
, data_count
= 0;
484 struct hostent
*hostent
;
485 struct in_addr inet_addr
;
487 /* first check to see if there's an ethernet port! */
488 monitor_printf ("ust\r");
489 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
));
490 if (!strchr (buf
, ':'))
491 error ("No ethernet connection!");
495 /* scan second colon in the output from the "ust" command */
496 char *myIPaddress
= strchr (strchr (buf
, ':') + 1, ':') + 1;
498 while (isspace (*myIPaddress
))
501 if (!strncmp (myIPaddress
, "0.0.", 4)) /* empty */
502 error ("Please use 'set board-address' to set the M32R-EVA board's IP address.");
503 if (strchr (myIPaddress
, '('))
504 *(strchr (myIPaddress
, '(')) = '\0'; /* delete trailing junk */
505 board_addr
= strsave (myIPaddress
);
507 if (server_addr
== 0)
510 gethostname (buf
, sizeof (buf
));
512 hostent
= gethostbyname (buf
);
516 memcpy (&inet_addr
.s_addr
, hostent
->h_addr
,
517 sizeof (inet_addr
.s_addr
));
518 server_addr
= (char *) inet_ntoa (inet_addr
);
520 server_addr
= (char *) inet_ntoa (hostent
->h_addr
);
523 if (server_addr
== 0) /* failed? */
524 error ("Need to know gdb host computer's IP address (use 'set server-address')");
527 if (args
== 0 || args
[0] == 0) /* no args: upload the current file */
528 args
= get_exec_file (1);
530 if (args
[0] != '/' && download_path
== 0)
532 if (current_directory
)
533 download_path
= strsave (current_directory
);
535 error ("Need to know default download path (use 'set download-path')");
538 start_time
= time (NULL
);
539 monitor_printf ("uhip %s\r", server_addr
);
540 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
)); /* parse result? */
541 monitor_printf ("ulip %s\r", board_addr
);
542 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
)); /* parse result? */
544 monitor_printf ("up %s\r", download_path
); /* use default path */
546 monitor_printf ("up\r"); /* rooted filename/path */
547 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
)); /* parse result? */
549 if (strrchr (args
, '.') && !strcmp (strrchr (args
, '.'), ".srec"))
550 monitor_printf ("ul %s\r", args
);
551 else /* add ".srec" suffix */
552 monitor_printf ("ul %s.srec\r", args
);
553 resp_len
= monitor_expect_prompt (buf
, sizeof (buf
)); /* parse result? */
555 if (buf
[0] == 0 || strstr (buf
, "complete") == 0)
556 error ("Upload file not found: %s.srec\nCheck IP addresses and download path.", args
);
558 printf_filtered (" -- Ethernet load complete.\n");
560 end_time
= time (NULL
);
561 abfd
= bfd_openr (args
, 0);
563 { /* Download is done -- print section statistics */
564 if (bfd_check_format (abfd
, bfd_object
) == 0)
566 printf_filtered ("File is not an object file\n");
568 for (s
= abfd
->sections
; s
; s
= s
->next
)
569 if (s
->flags
& SEC_LOAD
)
571 bfd_size_type section_size
= bfd_section_size (abfd
, s
);
572 bfd_vma section_base
= bfd_section_lma (abfd
, s
);
575 data_count
+= section_size
;
577 printf_filtered ("Loading section %s, size 0x%lx lma ",
578 bfd_section_name (abfd
, s
), section_size
);
579 print_address_numeric (section_base
, 1, gdb_stdout
);
580 printf_filtered ("\n");
581 gdb_flush (gdb_stdout
);
583 /* Finally, make the PC point at the start address */
584 write_pc (bfd_get_start_address (abfd
));
585 report_transfer_performance (data_count
, start_time
, end_time
);
586 printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd
));
588 inferior_pid
= 0; /* No process now */
590 /* This is necessary because many things were based on the PC at the
591 time that we attached to the monitor, which is no longer valid
592 now that we have loaded new code (and just changed the PC).
593 Another way to do this might be to call normal_stop, except that
594 the stack may not be valid, and things would get horribly
597 clear_symtab_users ();
600 #endif /* ! _MSC_VER */
603 _initialize_m32r_rom ()
605 /* Initialize m32r RevC monitor target */
607 init_monitor_ops (&m32r_ops
);
609 m32r_ops
.to_shortname
= "m32r";
610 m32r_ops
.to_longname
= "m32r monitor";
611 m32r_ops
.to_load
= m32r_load_gen
; /* monitor lacks a download command */
612 m32r_ops
.to_doc
= "Debug via the m32r monitor.\n\
613 Specify the serial device it is connected to (e.g. /dev/ttya).";
614 m32r_ops
.to_open
= m32r_open
;
615 add_target (&m32r_ops
);
617 /* Initialize mon2000 monitor target */
618 init_mon2000_cmds ();
619 init_monitor_ops (&mon2000_ops
);
621 mon2000_ops
.to_shortname
= "mon2000";
622 mon2000_ops
.to_longname
= "Mon2000 monitor";
623 mon2000_ops
.to_load
= m32r_load_gen
; /* monitor lacks a download command */
624 mon2000_ops
.to_doc
= "Debug via the Mon2000 monitor.\n\
625 Specify the serial device it is connected to (e.g. /dev/ttya).";
626 mon2000_ops
.to_open
= mon2000_open
;
627 add_target (&mon2000_ops
);
631 (add_set_cmd ("download-path", class_obscure
, var_string
,
632 (char *) &download_path
,
633 "Set the default path for downloadable SREC files.",
638 (add_set_cmd ("board-address", class_obscure
, var_string
,
639 (char *) &board_addr
,
640 "Set IP address for M32R-EVA target board.",
645 (add_set_cmd ("server-address", class_obscure
, var_string
,
646 (char *) &server_addr
,
647 "Set IP address for download server (GDB's host computer).",
651 add_com ("upload", class_obscure
, m32r_upload_command
,
652 "Upload the srec file via the monitor's Ethernet upload capability.");
654 add_com ("tload", class_obscure
, m32r_load
, "test upload command.");