From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27359 invoked by alias); 25 May 2010 19:25:06 -0000 Received: (qmail 27333 invoked by uid 22791); 25 May 2010 19:25:05 -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 smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 May 2010 19:25:00 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id F3FC7130E1 for ; Tue, 25 May 2010 12:24:58 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id E8BBA8E813 for ; Tue, 25 May 2010 12:24:58 -0700 (PDT) Message-ID: <4BFC240A.20902@vmware.com> Date: Tue, 25 May 2010 19:25:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [RFA] gdb.asm/*.exp send_gdb vs. gdb_test Content-Type: multipart/mixed; boundary="------------020509060200060106060905" 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/msg00574.txt.bz2 This is a multi-part message in MIME format. --------------020509060200060106060905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 10 short one --------------020509060200060106060905 Content-Type: text/plain; name="asm.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="asm.txt" Content-length: 2858 2010-05-25 Michael Snyder * gdb.asm/asm-source.exp: Replace send_gdb with gdb_test. Index: asm-source.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v retrieving revision 1.78 diff -u -p -r1.78 asm-source.exp --- asm-source.exp 5 May 2010 18:06:57 -0000 1.78 +++ asm-source.exp 25 May 2010 19:22:57 -0000 @@ -297,24 +297,16 @@ gdb_test "s" "$line_foo2\[ \]*.*" "step # Test 'info target', and incidentally capture the entry point address. set entry_point 0 -send_gdb "info target\n" -gdb_expect { +gdb_test_multiple "info target" "info target" { -re "Symbols from .*asm-source.*Entry point: 0x(\[01232456789abcdefABCDEF\]+).*$gdb_prompt $" { set entry_point $expect_out(1,string) pass "info target" } - -re ".*$gdb_prompt $" { - fail "info target" - } - timeout { - fail "info target (timeout)" - } } # Capture the start symbol (may be '_start' or 'start') set entry_symbol "" -send_gdb "info symbol 0x$entry_point\n" -gdb_expect { +gdb_test_multiple "info symbol 0x$entry_point" "info symbol" { -re "info symbol 0x$entry_point\[\r\n\]+(\[^\r\n\]*) in section .*$gdb_prompt $" { # We match the echoed `info symbol' command here, to help us # reliably identify the beginning of the start symbol in the @@ -330,12 +322,6 @@ gdb_expect { set entry_symbol $expect_out(1,string) pass "info symbol" } - -re ".*$gdb_prompt $" { - fail "info symbol" - } - timeout { - fail "info symbol (timeout)" - } } # Now try a 'list' from the other source file. @@ -388,10 +374,9 @@ gdb_test "info source" \ # with dynamic linking, where the system's shared libc was compiled # with debugging info; for example, on Linux, this produces 47kb of # output. So we consume it as we go. -send_gdb "info sources\n" set seen_asmsrc_1 0 set seen_asmsrc_2 0 -gdb_expect { +gdb_test_multiple "info sources" "info sources" { -re "^\[^,\]*asmsrc1.s(, |\[\r\n\]+)" { set seen_asmsrc_1 1 exp_continue @@ -410,9 +395,6 @@ gdb_expect { fail "info sources" } } - timeout { - fail "info sources (timeout)" - } } @@ -431,8 +413,7 @@ gdb_test "return" "\#0 main .*$line_mai # Disassemble something, check the output proc test_dis { command var } { global gdb_prompt - send_gdb "${command}\n" - gdb_expect { + gdb_test_multiple "${command}" "${command}" { -re "${var}.*:.*(Cannot access|Bad address)" { # The "disassembler" was only accessing the local # executable and that would cause attempts to disassemble @@ -442,9 +423,6 @@ proc test_dis { command var } { -re "${var}.*:.*${gdb_prompt}" { pass "${command}" } - timeout { - fail "${command} (timeout)" - } } } --------------020509060200060106060905--