-/* Remote debugging interface for MONITOR boot monitor, for GDB.
+/* Remote debugging interface for boot monitors, for GDB.
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
static void monitor_close();
static void monitor_fetch_register();
static void monitor_store_register();
-static int kiodebug; /* flag set by "set remotedebug" */
+#if 0
+static int sr_get_debug(); /* flag set by "set remotedebug" */
+#endif
static int hashmark; /* flag set by "set hash" */
#define LOG_FILE "monitor.log"
c = SERIAL_READCHAR(monitor_desc, timeout);
- if (kiodebug)
+ if (sr_get_debug())
putchar(c & 0x7f);
#ifdef LOG_FILE
char *p = string;
int c;
- if (kiodebug)
+ if (sr_get_debug())
printf ("Expecting \"%s\"\n", string);
immediate_quit = 1;
if (*p == '\0')
{
immediate_quit = 0;
- if (kiodebug)
+ if (sr_get_debug())
printf ("\nMatched\n");
return;
}
target_preopen(from_tty);
- monitor_close(0);
+/* if (is_open) */
+ monitor_close(0);
+ strcpy(dev_name, args);
monitor_desc = SERIAL_OPEN(dev_name);
if (monitor_desc == NULL)
monitor_store_registers ();
else
{
- if (kiodebug)
+ if (sr_get_debug())
printf ("Setting register %s to 0x%x\n", get_reg_name (regno), read_register (regno));
printf_monitor (SET_REG, get_reg_name (regno),
expect (sprintf (buf, MEM_PROMPT, memaddr + i), 1);
expect (CMD_DELIM);
printf_monitor ("%x", myaddr[i]);
- if (kiodebug)
+ if (sr_get_debug())
printf ("\nSet 0x%x to 0x%x\n", memaddr + i, myaddr[i]);
if (CMD_END)
{
len_this_pass -= startaddr % 16;
if (len_this_pass > (len - count))
len_this_pass = (len - count);
- if (kiodebug)
+ if (sr_get_debug())
printf ("\nDisplay %d bytes at %x\n", len_this_pass, startaddr);
for (i = 0; i < len_this_pass; i++)
printf_monitor (MEM_DIS_CMD, startaddr);
expect (sprintf(buf, MEM_PROMPT, startaddr), 1);
get_hex_byte (&myaddr[count++]);
- if (kiodebug)
+ if (sr_get_debug())
printf ("\nRead a 0x%x from 0x%x\n", myaddr[count-1], startaddr);
if (CMD_END)
{
if (breakaddr[i] == 0)
{
breakaddr[i] = addr;
- if (kiodebug)
+ if (sr_get_debug())
printf ("Breakpoint at %x\n", addr);
monitor_read_inferior_memory(addr, shadow, memory_breakpoint_size);
printf_monitor(SET_BREAK_CMD, addr);
char buf[DOWNLOAD_LINE_SIZE];
int i, bytes_read;
- if (kiodebug)
+ if (sr_get_debug())
printf ("Loading %s to monitor\n", arg);
download = fopen (arg, "r");
void
_initialize_remote_monitors ()
{
- add_show_from_set (
+/*** add_show_from_set (
add_set_cmd ("remotedebug", no_class, var_boolean,
(char *)&kiodebug,
"Set debugging of I/O to a serial based Monitor.\n\
When enabled, debugging info is displayed.",
&setlist),
&showlist);
+***/
add_show_from_set (
add_set_cmd ("hash", no_class, var_boolean,
(char *)&hashmark,