This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Test scalar call/return/finish test - call-sc


On Sun, Apr 25, 2004 at 01:44:36PM +0200, Mark Kettenis wrote:
> Anyway, can anybody shoot any holes in my new regexp?

> -	-re "type = (\[^\\r\\n\]*).*$gdb_prompt $" {
> +	-re "type = (.*)\r\n.*$gdb_prompt $" {

Should work - but I'd do this instead, if it works:
	-re "type = (\[^\r\n\]*)\r\n$gdb_prompt $"

No reason to use .* unnecessarily, and this prevents an error message
from appearing after the ptype and not being caught.  Our testsuite is
very bad about that.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]