+2001-06-28 Andrew Cagney <ac131313@redhat.com>
+
+ From 2000-12-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
+ * monitor.c (setmem_resp_delim_pattern): New regexp pattern.
+ (setreg_resp_delim_pattern): Likewise.
+ (setmem_resp_delim_fastmap): New buffer.
+ (setreg_resp_delim_fastmap): Likewise.
+ (monitor_open): Initialize above regexp if they are defined.
+ (monitor_write_memory): Use regexp to check the result of write.
+ (monitor_store_register): Likewise to check result of register set.
+
2001-06-28 Andrew Cagney <ac131313@redhat.com>
From 2000-06-14 John Marshall <john_w_marshall@palm.com>:
static struct re_pattern_buffer getmem_resp_delim_pattern;
static char getmem_resp_delim_fastmap[256];
+static struct re_pattern_buffer setmem_resp_delim_pattern;
+static char setmem_resp_delim_fastmap[256];
+
+static struct re_pattern_buffer setreg_resp_delim_pattern;
+static char setreg_resp_delim_fastmap[256];
+
static int dump_reg_flag; /* Non-zero means do a dump_registers cmd when
monitor_wait wakes up. */
compile_pattern (mon_ops->getmem.resp_delim, &getmem_resp_delim_pattern,
getmem_resp_delim_fastmap);
+ if (mon_ops->setmem.resp_delim)
+ compile_pattern (mon_ops->setmem.resp_delim, &setmem_resp_delim_pattern,
+ setmem_resp_delim_fastmap);
+
+ if (mon_ops->setreg.resp_delim)
+ compile_pattern (mon_ops->setreg.resp_delim, &setreg_resp_delim_pattern,
+ setreg_resp_delim_fastmap);
+
unpush_target (targ_ops);
if (dev_name)
else
monitor_printf (current_monitor->setreg.cmd, name, val);
+ if (current_monitor->setreg.resp_delim)
+ {
+ monitor_debug ("EXP setreg.resp_delim\n");
+ monitor_expect_regexp (&setreg_resp_delim_pattern, NULL, 0);
+ if (current_monitor->flags & MO_SETREG_INTERACTIVE)
+ monitor_printf ("%s\r", paddr_nz (val));
+ }
if (current_monitor->setreg.term)
{
monitor_debug ("EXP setreg.term\n");
monitor_printf_noecho (cmd, memaddr);
+ if (current_monitor->setmem.resp_delim)
+ {
+ monitor_debug ("EXP setmem.resp_delim");
+ monitor_expect_regexp (&setmem_resp_delim_pattern, NULL, 0);
+ monitor_printf ("%x\r", val);
+ }
if (current_monitor->setmem.term)
{
monitor_debug ("EXP setmem.term");