From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20143 invoked by alias); 21 May 2010 23:01:30 -0000 Received: (qmail 19974 invoked by uid 22791); 21 May 2010 23:01:29 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 May 2010 23:01:25 +0000 Received: (qmail 12241 invoked from network); 21 May 2010 23:01:24 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 May 2010 23:01:24 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] gdb.base, f*.exp to l*.exp, send_gdb vs. gdb_test Date: Fri, 21 May 2010 23:32:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-21-generic; KDE/4.3.2; x86_64; ; ) Cc: Michael Snyder References: <4BF6E9FC.8000503@vmware.com> In-Reply-To: <4BF6E9FC.8000503@vmware.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005220001.21966.pedro@codesourcery.com> 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: 2010-05/txt/msg00523.txt.bz2 On Friday 21 May 2010 21:15:56, Michael Snyder wrote: > + set test "unpatch child, unpatched parent breakpoints from child" > + gdb_test_multiple "continue" $test { > + -re "at exit.*$gdb_prompt $" { > + pass "$test" > + } > + -re "SIGTRAP.*$gdb_prompt $" { > + fail "$test" > + > + # Explicitly kill this child, so we can continue gracefully > + # with further testing... > + send_gdb "kill\n" > + gdb_expect { > + -re ".*Kill the program being debugged.*y or n. $" { > + send_gdb "y\n" > + gdb_expect -re "$gdb_prompt $" {} > + } > + } > + } > + -re ".*$gdb_prompt $" { > + fail "$test (unknown output)" > + } > + timeout { > + fail "$test (timeout)" > + } I guess these last two cases could be deleted too? Doesn't matter much --- okay anyway. > --- long_long.exp 1 Jan 2010 07:32:01 -0000 1.30 > +++ long_long.exp 21 May 2010 20:12:01 -0000 > @@ -61,15 +61,9 @@ if { ![runto known_types] } then { ... > -set target_bigendian_p 1 I think you should still set this, so if the test fails, the following tests referencing this don't error out reading a non-existing variable. Wait, the gdb_test_bi function in this file, the only user of this variable, isn't itself used anywhere. Huh? This means the variable could be garbage collected instead, and this gdb_test_multiple below simplified. > -send_gdb "show endian\n" > -gdb_expect { > +gdb_test_multiple "show endian" "getting target endian" { > -re "little endian.*$gdb_prompt $" { set target_bigendian_p 0 } > - -re "big endian.*$gdb_prompt $" { } > - -re "$gdb_prompt $" { > - fail "getting target endian" > - } > - default { fail "(timeout) getting target endian" } > + -re "big endian.*$gdb_prompt $" { set target_bigendian_p 1 } > } Otherwise, it looked fine. Thanks for all this. -- Pedro Alves