From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18951 invoked by alias); 30 Apr 2011 14:54:41 -0000 Received: (qmail 18943 invoked by uid 22791); 30 Apr 2011 14:54:40 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Sat, 30 Apr 2011 14:54:21 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3UEsJC7010537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Apr 2011 10:54:19 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3UEsHKk008091 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Apr 2011 10:54:19 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p3UEsHTe014038; Sat, 30 Apr 2011 16:54:17 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p3UEsECS014036; Sat, 30 Apr 2011 16:54:14 +0200 Date: Sat, 30 Apr 2011 14:54:00 -0000 From: Jan Kratochvil To: Edjunior Barbosa Machado Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH] testsuite: inline-cmds.exp: adjust checks with 'finish' command Message-ID: <20110430145414.GA8989@host1.jankratochvil.net> References: <4DB7BAEF.3070303@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DB7BAEF.3070303@linux.vnet.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-04/txt/msg00569.txt.bz2 On Wed, 27 Apr 2011 08:42:55 +0200, Edjunior Barbosa Machado wrote: > Content-Type: text/plain; charset=ISO-8859-1; format=flowed I could not apply the patch to test it as it is corrupted, both if taken as raw and if taken as flowed-decoded (at least according to the Mutt decoding). I am fine with "Content-Disposition: inline" text/plain attachment otherwise (but not everyone is fine with it here). > --- a/gdb/testsuite/ChangeLog > +++ b/gdb/testsuite/ChangeLog > @@ -1,3 +1,8 @@ > +2011-04-27 Edjunior Machado > + > + * gdb.opt/inline-cmds.exp: Adjust checks with "finish" command to > + accept to show the caller line again as well as the line after. > + > 2011-04-25 Jan Kratochvil > * gdb.base/gdbindex-stabs-dwarf.c: New file. It is more convenient to provide ChangeLog entry as text - not as diff - as it is out of sync now. > diff --git a/gdb/testsuite/gdb.opt/inline-cmds.exp b/gdb/testsuite/gdb.opt/inline-cmds.exp > index cde86f5..cbf3160 100644 > --- a/gdb/testsuite/gdb.opt/inline-cmds.exp > +++ b/gdb/testsuite/gdb.opt/inline-cmds.exp > @@ -263,7 +263,20 @@ gdb_continue_to_breakpoint "finish into func1" > gdb_test "next" ".*marker \\\(\\\);" "next to finish marker" > gdb_test "step" ".*set breakpoint 2 here.*" "step into finish marker" > -gdb_test "finish" "func1 \\\(\\\);" "finish from marker to func1" > + > +# Some architectures will have one or more instructions after > +# the call instruction which still are part of the call sequence, > +# so it should be expected to return to the caller line after issue > +# a 'finish' command. > +gdb_test_multiple "finish" "finish from marker" { > + -re "func1 \\\(\\\);.*" { Missing prompt (it is assumed by gdb_test but not by gdb_test_multiple): -re "func1 \\\(\\\);.*\r\n$gdb_prompt $" { > + pass "finish from marker to func1" > + } > + -re "marker \\\(\\\);.*" { Missing prompt. > + pass "finish from marker" > + gdb_test "step" "func1 \\\(\\\);.*" "step after marker to reach func1" Here should be used for the indentation but that may have been corrupted by your MUA. > + } > +} > gdb_test "step" "bar \\\(\\\);" "step into func1 for finish" > gdb_test "finish" "func3 \\\(\\\);" "finish from func1 to func3" > @@ -273,7 +286,15 @@ set line6 [gdb_get_line_number "set breakpoint 6 here"] > gdb_breakpoint $line6 > gdb_continue_to_breakpoint "before the outer_inline call" > gdb_test "step" "marker \\\(\\\) at .*" "reach 1 the outer_inline call" > -gdb_test "finish" "main \\\(\\\) at .*outer_inline2 \\\(\\\);" "reach outer_inline2" > +gdb_test_multiple "finish" "finish from marker" { > + -re "main \\\(\\\) at .*outer_inline2 \\\(\\\);.*" { The same prompt issue as above. > + pass "reach outer_inline2" > + } > + -re "main \\\(\\\) at .*marker \\\(\\\);.*" { The same prompt issue as above. > + pass "finish from marker" > + gdb_test "step" "outer_inline2 \\\(\\\);.*" "step after marker to reach outer_inline2" {"outer_inline2 \(\);.*} would be the same but sure your choice. > + } > +} Otherwise it would be best if "finish" always stays on the caller line, even if no instruction is present there. But that is sure outside of the scope of this testcase fix. Thanks, Jan