This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Use regexp to check result of write reg/memory in monitors
- To: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Subject: Re: [RFA]: Use regexp to check result of write reg/memory in monitors
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 28 Jun 2001 15:58:24 -0400
- Cc: gdb-patches at sourceware dot cygnus dot com
- References: <3A297E8B.22D327E4@worldnet.fr>
FYI,
I've checked this in. The only concern I had was over possible affects
on the existing code that used monitor.c. Looking closely at this patch
and it is careful to keep backward compatibility.
Andrew
> Hi!
>
> The Gdb monitor framework only supports a fixed pattern for the output
> produced by write_memory and store_register.
>
> For the 68HC11 buffalo monitor, the memory write command produces some output
> that depends on the command. Setting a register also produces an output that
> depends on the register being set.
>
> The following patch uses the 'setmem.resp_delim' and 'setreg.resp_delim'
> of monitor_ops to specify two regular expressions to check the output
> of the 'setmem.cmdb' and 'setreg.cmd' commands. These two fields are
> currently not used. They are null for all existing monitors (see grep output).
>
> Can you approve this patch?
>
> Stephane
>
> 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.
>
>