/* Remote debugging interface for boot monitors, for GDB.
- Copyright (C) 1990-2002, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
Resurrected from the ashes by Stu Grossman.
static void monitor_debug (const char *fmt, ...) ATTRIBUTE_PRINTF (1, 2);
-static int monitor_debug_p = 0;
+static unsigned int monitor_debug_p = 0;
/* NOTE: This file alternates between monitor_debug_p and remote_debug
when determining if debug information is printed. Perhaps this
if (final_char)
error (_("%s (%s): %s: %s%c"),
- function, paddress (target_gdbarch, memaddr),
+ function, paddress (target_gdbarch (), memaddr),
message, safe_string, final_char);
else
error (_("%s (%s): %s: %s"),
- function, paddress (target_gdbarch, memaddr),
+ function, paddress (target_gdbarch (), memaddr),
message, safe_string);
}
static void
monitor_vsprintf (char *sndbuf, char *pattern, va_list args)
{
- int addr_bit = gdbarch_addr_bit (target_gdbarch);
+ int addr_bit = gdbarch_addr_bit (target_gdbarch ());
char format[10];
char fmt;
char *p;
}
immediate_quit++;
+ QUIT;
while (1)
{
if (buf)
#endif
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
discard_cleanups (old_chain);
static int
monitor_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
unsigned int val, hostval;
char *cmd;
int i;
- monitor_debug ("MON write %d %s\n", len, paddress (target_gdbarch, memaddr));
+ monitor_debug ("MON write %d %s\n", len, paddress (target_gdbarch (), memaddr));
if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
- memaddr = gdbarch_addr_bits_remove (target_gdbarch, memaddr);
+ memaddr = gdbarch_addr_bits_remove (target_gdbarch (), memaddr);
/* Use memory fill command for leading 0 bytes. */
static int
monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
{
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
unsigned int val;
char membuf[sizeof (int) * 2 + 1];
char *p;
}
monitor_debug ("MON read block ta(%s) ha(%s) %d\n",
- paddress (target_gdbarch, memaddr),
+ paddress (target_gdbarch (), memaddr),
host_address_to_string (myaddr), len);
if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
- memaddr = gdbarch_addr_bits_remove (target_gdbarch, memaddr);
+ memaddr = gdbarch_addr_bits_remove (target_gdbarch (), memaddr);
if (current_monitor->flags & MO_GETMEM_READ_SINGLE)
return monitor_read_memory_single (memaddr, myaddr, len);
NULL, /* FIXME: i18n: */
&setlist, &showlist);
- add_setshow_zinteger_cmd ("monitor", no_class, &monitor_debug_p, _("\
+ add_setshow_zuinteger_cmd ("monitor", no_class, &monitor_debug_p, _("\
Set debugging of remote monitor communication."), _("\
Show debugging of remote monitor communication."), _("\
When enabled, communication between GDB and the remote monitor\n\
is displayed."),
- NULL,
- NULL, /* FIXME: i18n: */
- &setdebuglist, &showdebuglist);
+ NULL,
+ NULL, /* FIXME: i18n: */
+ &setdebuglist, &showdebuglist);
/* Yes, 42000 is arbitrary. The only sense out of it, is that it
isn't 0. */