This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] testsuite: Avoid buffer overrun in gdb.base/default.exp
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 6 Aug 2010 17:07:50 +0200
- Subject: Re: [RFA] testsuite: Avoid buffer overrun in gdb.base/default.exp
- References: <001801cb3578$15f7a550$41e6eff0$@muller@ics-cnrs.unistra.fr>
On Fri, 06 Aug 2010 17:00:18 +0200, Pierre Muller wrote:
When using attachments please use:
Content-Disposition: inline
and not
Content-Disposition: attachment
+gdb_test_multiple "info set" "info set" {
+ -re "confirm: Whether to confirm potentially dangerous operations is o\[a-z\]*.(\[^\r\n\]*\[\r\n\])+history filename: The filename in which to record the command history is (\[^\r\n\]*\[\r\n\])+listsize: Number of source lines gdb will list by default is 10.*" {
+ verbose "Confirm dislayed"
+ set set_confirm_seen 1
+ exp_continue
+ }
+ -re "Gdb's prompt is \"$gdb_prompt \"" {
+ verbose "GDB prompt displayed"
+ set set_prompt_seen 1
+ exp_continue
+ }
+ -re "Writing into executable.*$gdb_prompt $" {
+ verbose "write displayed"
+ if { $set_prompt_seen && $set_confirm_seen } {
+ pass "info set"
+ } else {
+ verbose "prompt $set_prompt_seen confirm $set_confirm_seen"
+ fail "info set (incomplete output)"
+ }
+ }
+}
The first pattern can eat up the text expected to be matched by the third
pattern. This way the loop will never finish. Or do I miss something?
The first pattern can match at once something like:
confirm: Whether to confirm potentially dangerous operations is o history filename: The filename in which to record the command history is listsize: Number of source lines gdb will list by default is 10 Writing into executable (gdb)
Thanks,
Jan