From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16670 invoked by alias); 2 Dec 2011 01:18:29 -0000 Received: (qmail 16662 invoked by uid 22791); 2 Dec 2011 01:18:27 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Dec 2011 01:18:12 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pB21I7eg024177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Dec 2011 20:18:07 -0500 Received: from host2.jankratochvil.net (ovpn-116-69.ams2.redhat.com [10.36.116.69]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pB21I0xB007223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 1 Dec 2011 20:18:03 -0500 Date: Fri, 02 Dec 2011 01:18:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Pedro Alves , gdb-patches@sourceware.org, Ulrich Weigand Subject: [patch] testsuite: Fix mi-solib.exp without debuginfos [Re: [3/3] RFC: fix PR mi/8444] Message-ID: <20111202011800.GA23680@host2.jankratochvil.net> References: <201111251608.pAPG81oE002175@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111251608.pAPG81oE002175@d06av02.portsmouth.uk.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00031.txt.bz2 On Fri, 25 Nov 2011 17:08:01 +0100, Ulrich Weigand wrote: > The difference is that we only see a "from=" instead of > "file="/"fullname="/"line=" as the PC is in a system library, and I don't > have debug info installed for those ... What about this patch? I have checked the result of mi_expect_stop is not used anywhere so it is questionable what it should return. No regressions on {x86_64,x86_64-m32,i686}-fedora16-linux-gnu. Thanks, Jan gdb/testsuite/ 2011-12-02 Jan Kratochvil Fix gdb.mi/mi-solib.exp without system debug info installed. * lib/mi-support.exp (mi_expect_stop): Accept FILE also for `from' expect attribute, return 0 for it. Update comments. --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -981,9 +981,10 @@ proc mi_detect_async {} { # Wait for MI *stopped notification to appear. # The REASON, FUNC, ARGS, FILE and LINE are regular expressions -# to match against whatever is output in *stopped. ARGS should -# not include [] the list of argument is enclosed in, and other -# regular expressions should not include quotes. +# to match against whatever is output in *stopped. FILE may also match +# filename of a file without debug info. ARGS should not include [] the +# list of argument is enclosed in, and other regular expressions should +# not include quotes. # If EXTRA is a list of one element, it's the regular expression # for output expected right after *stopped, and before GDB prompt. # If EXTRA is a list of two elements, the first element is for @@ -991,9 +992,10 @@ proc mi_detect_async {} { # right after reason field. The regex after reason should not include # the comma separating it from the following fields. # -# When we fail to match output at all, -1 is returned. Otherwise, -# the line at which we stop is returned. This is useful when exact -# line is not possible to specify for some reason -- one can pass +# When we fail to match output at all, -1 is returned. If FILE does +# match and the target system has no debug info for FILE return 0. +# Otherwise, the line at which we stop is returned. This is useful when +# exact line is not possible to specify for some reason -- one can pass # the .* or "\[0-9\]*" regexps for line, and then check the line # programmatically. # @@ -1067,11 +1069,15 @@ proc mi_expect_stop { reason func args file line extra test } { set any "\[^\n\]*" - verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re|$breakpoint_re)*$prompt_re" + verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$func\",args=$args,(?:file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"|from=\"$file\")\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re|$breakpoint_re)*$prompt_re" gdb_expect { - -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re|$breakpoint_re)*$prompt_re" { + -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$func\",args=$args,(?:file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"|from=\"$file\")\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re|$breakpoint_re)*$prompt_re" { pass "$test" - return $expect_out(2,string) + if {[array names expect_out "2,string"] != ""} { + return $expect_out(2,string) + } + # No debug info available but $file does match. + return 0 } -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$any\",args=\[\\\[\{\]$any\[\\\]\}\],file=\"$any\",fullname=\"${fullname_syntax}$any\",line=\"\[0-9\]*\"\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re|$breakpoint_re)*$prompt_re" { verbose -log "got $expect_out(buffer)"