From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6940 invoked by alias); 12 Apr 2011 16:02:42 -0000 Received: (qmail 6930 invoked by uid 22791); 12 Apr 2011 16:02:41 -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; Tue, 12 Apr 2011 16:02:32 +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 p3CG2ONn007081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Apr 2011 12:02:25 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3CG2MRE019431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Apr 2011 12:02:24 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p3CG2Lth018962; Tue, 12 Apr 2011 18:02:21 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p3CG2Kbr018961; Tue, 12 Apr 2011 18:02:20 +0200 Date: Tue, 12 Apr 2011 16:02:00 -0000 From: Jan Kratochvil To: Edjunior Barbosa Machado Cc: Yao Qi , "gdb@sourceware.org" Subject: Re: "optimized out" on gdb.base/gdb1090.exp Message-ID: <20110412160220.GA18580@host1.jankratochvil.net> References: <4DA3A7D0.2000701@linux.vnet.ibm.com> <4DA3B701.3060902@codesourcery.com> <4DA4573D.1040101@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DA4573D.1040101@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00038.txt.bz2 On Tue, 12 Apr 2011 15:44:29 +0200, Edjunior Barbosa Machado wrote: > My only concern is if this check in the same frame will not affect the main > purpose of the testcase. One should find the fix, I do not see it obvious which one it is. > --- a/gdb/testsuite/gdb.base/gdb1090.exp > +++ b/gdb/testsuite/gdb.base/gdb1090.exp > @@ -40,12 +40,9 @@ gdb_start > gdb_reinitialize_dir $srcdir/$subdir > gdb_load ${binfile} > -if ![runto marker] then { > - perror "couldn't run to breakpoint" > - continue > -} > -gdb_test "up" ".*foo.*" "up from marker" > +gdb_breakpoint [gdb_get_line_number "break-here"] > +gdb_run_cmd gdb_run_cmd produces output which is not caught anywhere here. This will result in testcase races. BTW runto expects a function name, not file:line notation. This is why the pair gdb_breakpoint [gdb_get_line_number "break-here"] gdb_continue_to_breakpoint "break-here" ".* break-here .*" is popular. > gdb_test_multiple "print s24" "print s24" { > -re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" { > pass "print s24" Thanks, Jan