Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] testsuite: Avoid buffer overrun in gdb.base/default.exp
Date: Fri, 06 Aug 2010 15:08:00 -0000	[thread overview]
Message-ID: <20100806150750.GA25094@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <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


  reply	other threads:[~2010-08-06 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 14:59 Pierre Muller
2010-08-06 15:08 ` Jan Kratochvil [this message]
2010-08-06 15:47   ` Pierre Muller
2010-08-09  9:10     ` Pierre Muller
     [not found]     ` <44545.549437362$1281345013@news.gmane.org>
2010-08-18 22:26       ` Tom Tromey
2010-08-19  7:08         ` Pierre Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100806150750.GA25094@host1.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox