From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20281 invoked by alias); 21 Jan 2004 23:14:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20274 invoked from network); 21 Jan 2004 23:14:11 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 21 Jan 2004 23:14:11 -0000 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 083C4800195; Wed, 21 Jan 2004 18:14:10 -0500 (EST) Message-ID: <400F07C1.1060804@redhat.com> Date: Wed, 21 Jan 2004 23:14:00 -0000 From: "J. Johnston" Organization: Red Hat Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 MIME-Version: 1.0 To: "J. Johnston" Cc: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com Subject: Re: [RFA]: pending breakpoint support [2/3] References: <20040121222104.6C14E4B104@berman.michael-chastain.com> <400F040E.9000603@redhat.com> In-Reply-To: <400F040E.9000603@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00603.txt.bz2 J. Johnston wrote: > Michael Elizabeth Chastain wrote: > >> Hi Jeff, >> >> This needs some work. >> >> +gdb_test_multiple "b langs0" "break on nonexistent function in >> langs.exp" { >> + -re "Function \"langs0\" not defined\.$" { >> + pass "break on nonexistent function in langs.exp" >> + } >> + -re "Function \"langs0\" not defined\..*Make breakpoint pending.*" { >> + send_gdb "n\n" >> + pass "break on nonexistent function in langs.exp" >> + } >> + -re "Breakpoint .* (deferred).*" { >> + pass "break on nonexistent function in langs.exp" >> + } >> + -re ".*$gdb_prompt.*" { >> + fail "break on nonexistent function in langs.exp" >> + } >> + timeout { fail "break on nonexistent function in langs.exp" } >> +} >> >> All the arms of a gdb_test_muliple need to end in "$gdb_prompt $" (or >> something) to match all the text of the output string. A pattern like >> "Breakpoint .* (deferred).*" will match some indeterminate amount of >> text after "deferred", leading to nondeterministic results for the next >> test. >> >> "Make breakpoint pending" does not end in "$gdb_prompt $" but it >> should end with something other than ".*" for the same reason. >> > > I am trying to fix that. I tried specifying the prompt fully and > changed the send_gdb to be a gdb_test as suggested by Daniel. > Unfortunately, I get an "ERROR: got an interactive prompt" message now. > I need to look into why this is happening. > Found the problem...didn't escape the question mark. As soon as I clarify Daniel's one comment I will repost. >> You don't need a ".*$gdb_prompt $" or a "timeout" case; >> gdb_test_multiple automatically provides those. >> >> The '(' and ')' need to be escaped: "\\(deferred\\)". >> > > Done. > >> How come "Breakpoint .* \\(deferred\\).*$gdb_prompt $" is a PASS? >> The function does not exist, so shouldn't that be a FAIL? >> Or do I not understand your work? >> > > It has nothing to do with me. This was in the original gdb_test so I made > sure it was still there. > >> >>> Index: testsuite/gdb.base/pending.c >>> Index: testsuite/gdb.base/pendshr.c >> >> >> >> These file need copyright notices. >> See break.c for a good copyright notice. >> > > Done. > >> +gdb_test_multiple "break pendfunc1" "set pending breakpoint" { >> + -re ".*Make breakpoint pending.*$" { >> + gdb_test_multiple "y" "set pending breakpoint" { >> + -re "Breakpoint.*pendfunc1.*pending.*$gdb_prompt $" { >> + pass "set pending breakpoint" >> + } >> + } >> + } >> +} >> >> Same as before, don't put a ".*" at the end of a pattern. >> > > Ok. > >> >>> diff -u -p -r1.7 shlib-call.exp >>> --- testsuite/gdb.base/shlib-call.exp 28 Sep 2002 01:12:04 >>> -0000 1.7 >>> +++ testsuite/gdb.base/shlib-call.exp 21 Jan 2004 02:36:24 -0000 >> >> >> >> Add 2004 to the list of copyright years. >> > > Done. > > Will repost when I have everything working again. > > >