/* Remote debugging interface for boot monitors, for GDB.
- Copyright 1990-1993, 1995-1997, 1999-2000 Free Software Foundation, Inc.
+ Copyright 1990-1993, 1995-1997, 1999-2000, 2001 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
Resurrected from the ashes by Stu Grossman.
#include "defs.h"
#include "gdbcore.h"
#include "target.h"
-#include "gdb_wait.h"
#include <signal.h>
#include <ctype.h>
#include "gdb_string.h"
#include "inferior.h"
#include "gdb_regex.h"
#include "srec.h"
+#include "regcache.h"
static char *dev_name;
static struct target_ops *targ_ops;
static void monitor_store_registers (int regno);
static void monitor_prepare_to_store (void);
static int monitor_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int write, struct target_ops *target);
+ int write,
+ struct mem_attrib *attrib,
+ struct target_ops *target);
static void monitor_files_info (struct target_ops *ops);
static int monitor_insert_breakpoint (CORE_ADDR addr, char *shadow);
static int monitor_remove_breakpoint (CORE_ADDR addr, char *shadow);
len = strlen (sndbuf);
if (len + 1 > sizeof sndbuf)
- abort ();
+ internal_error (__FILE__, __LINE__, "failed internal consistency check");
if (monitor_debug_p)
{
len = strlen (sndbuf);
if (len + 1 > sizeof sndbuf)
- abort ();
+ internal_error (__FILE__, __LINE__, "failed internal consistency check");
if (monitor_debug_p)
{
unpush_target (targ_ops);
if (dev_name)
- free (dev_name);
- dev_name = strsave (args);
+ xfree (dev_name);
+ dev_name = xstrdup (args);
monitor_desc = SERIAL_OPEN (dev_name);
/* Free breakpoint memory */
if (breakaddr != NULL)
{
- free (breakaddr);
+ xfree (breakaddr);
breakaddr = NULL;
}
parse_register_dump (buf, resp_len);
}
else
- abort (); /* Need some way to read registers */
+ internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Need some way to read registers */
}
static void
static int
monitor_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct target_ops *target)
+ struct mem_attrib *attrib ATTRIBUTE_UNUSED,
+ struct target_ops *target ATTRIBUTE_UNUSED)
{
int res;