if (monitor_debug_p)
{
va_list args;
+
va_start (args, fmt);
vfprintf_filtered (gdb_stdlog, fmt, args);
va_end (args);
{
int real_len = (len == 0 && string != (char *) 0) ? strlen (string) : len;
char *safe_string = alloca ((real_len * 4) + 1);
+
monitor_printable_string (safe_string, string, real_len);
if (final_char)
if (monitor_debug_p)
{
char *safe_string = (char *) alloca ((strlen (sndbuf) * 4) + 1);
+
monitor_printable_string (safe_string, sndbuf, 0);
fprintf_unfiltered (gdb_stdlog, "sent[%s]\n", safe_string);
}
if (monitor_debug_p)
{
char *safe_string = (char *) alloca ((len * 4) + 1);
+
monitor_printable_string (safe_string, sndbuf, 0);
fprintf_unfiltered (gdb_stdlog, "sent[%s]\n", safe_string);
}
if (monitor_debug_p || remote_debug)
{
char buf[2];
+
buf[0] = c;
buf[1] = '\0';
puts_debug ("read -->", buf, "<--");
{
char *mybuf;
char *p;
+
monitor_debug ("MON Expecting regexp\n");
if (buf)
mybuf = buf;
{
int regnamelen, vallen;
char *regname, *val;
+
/* Element 0 points to start of register name, and element 1
points to the start of the register value. */
struct re_registers register_strings;
struct target_waitstatus *status)
{
int resp_len;
+
do
{
resp_len = monitor_expect_prompt (buf, bufmax);
if (current_monitor->flags & MO_HEX_PREFIX)
{
int c;
+
c = readchar (timeout);
while (c == ' ')
c = readchar (timeout);
for (i = 0; i < register_size (get_regcache_arch (regcache), regno) * 2; i++)
{
int c;
+
c = readchar (timeout);
while (c == ' ')
c = readchar (timeout);
{
char buf[TARGET_BUF_SIZE];
int resp_len;
+
monitor_printf (block_cmd);
resp_len = monitor_expect_prompt (buf, sizeof (buf));
parse_register_dump (regcache, buf, resp_len);
{
char buf[TARGET_BUF_SIZE];
int resp_len;
+
if (current_monitor->dumpregs)
(*(current_monitor->dumpregs)) (regcache); /* call supplied function */
else if (current_monitor->dump_registers) /* default version */
monitor_printf_noecho (cmd, memaddr, val);
else if (current_monitor->flags & MO_SETMEM_INTERACTIVE)
{
-
monitor_printf_noecho (cmd, memaddr);
if (current_monitor->setmem.resp_delim)
monitor_printf ("%x\r", val);
}
if (current_monitor->setmem.term_cmd)
- { /* Emit this to get out of the memory editing state */
+ { /* Emit this to get out of the memory editing state */
monitor_printf ("%s", current_monitor->setmem.term_cmd);
/* Drop through to expecting a prompt */
}
{
unsigned char val;
int written = 0;
+
if (len == 0)
return 0;
/* Enter the sub mode */
{
int i, j;
unsigned char x;
+
i = 0;
j = 7;
while (i < 4)
unsigned char *scan, *limit; /* loop controls */
unsigned char c, nib;
int leadzero = 1;
+
scan = disbuf;
limit = scan + 8;
{
unsigned long long *dp;
+
dp = (unsigned long long *) scan;
*dp = value;
}
long long *llptr;
long long value;
int written = 0;
+
llptr = (unsigned long long *) myaddr;
if (len == 0)
return 0;
monitor_write_memory_block (CORE_ADDR memaddr, char *myaddr, int len)
{
int written;
+
written = 0;
/* FIXME: This would be a good place to put the zero test */
#if 1
{
int i;
+
for (i = 0; i < len * 2; i++)
{
int c;
{
int retval, tmp;
struct re_registers resp_strings;
+
monitor_debug ("MON getmem.resp_delim %s\n", current_monitor->getmem.resp_delim);
memset (&resp_strings, 0, sizeof (struct re_registers));