From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18190 invoked by alias); 25 May 2010 18:19:07 -0000 Received: (qmail 18180 invoked by uid 22791); 25 May 2010 18:19:06 -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-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 May 2010 18:19:01 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 5DEBB17007; Tue, 25 May 2010 11:18:59 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by jupiter.vmware.com (Postfix) with ESMTP id 53DD2DC04A; Tue, 25 May 2010 11:18:59 -0700 (PDT) Message-ID: <4BFC1492.7000607@vmware.com> Date: Tue, 25 May 2010 19:17:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Joel Brobecker CC: "gdb-patches@sourceware.org" Subject: Re: [RFA] maint.exp miscexprs.exp nodebug.exp send_gdb / gdb_test References: <4BF5CF46.4000105@vmware.com> <20100525172332.GX3019@adacore.com> In-Reply-To: <20100525172332.GX3019@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00571.txt.bz2 Joel Brobecker wrote: >> 2010-05-20 Michael Snyder >> >> * gdb.base/maint.exp: Replace send_gdb with gdb_test. >> * gdb.base/miscexprs.exp: Replace send_gdb with gdb_test. >> * gdb.base/nodebug.exp: Replace send_gdb with gdb_test. > > I only spotted one issue... The rest looked ok to me. > > >> +gdb_test "maint space 0" "maint space 0" > > Shouldn't this one be gdb_test_no_output? Sounds good. > >> + -re "^maint print psymbols psymbols_output \[^\n\]*\r\n$gdb_prompt $" { >> + send_gdb "shell ls psymbols_output\n" >> + gdb_expect { >> + -re "psymbols_output\r\n$gdb_prompt $" { >> + # We want this grep to be as specific as possible, >> + # so it's less likely to match symbol file names in >> + # psymbols_output. Yes, this actually happened; >> + # poor expect got tons of output, and timed out >> + # trying to match it. --- Jim Blandy >> + send_gdb "shell grep 'main.*function' psymbols_output\n" >> + gdb_expect { >> + -re ".main., function, $hex.*$gdb_prompt $" { >> + pass "maint print psymbols 1" >> + } >> + -re ".*main. .., function, $hex.*$gdb_prompt $" { >> + pass "maint print psymbols 2" >> + } >> + -re ".*$gdb_prompt $" { fail "maint print psymbols" } >> + timeout { fail "(timeout) maint print psymbols" } >> + } >> + gdb_test "shell rm -f psymbols_output" "" >> + } >> + -re ".*$gdb_prompt $" { fail "maint print psymbols" } >> + timeout { fail "(timeout) maint print psymbols" } >> + } >> + } >> + -re ".*$gdb_prompt $" { fail "maint print psymbols" } >> + timeout { fail "(timeout) maint print psymbols" } > > Ugh! I understand that this is not the objective of this patch, but > I think that this could be greatly simplified by rewriting this using > pure tcl, and without using GDB as the gateway to a shell interpreter. Heh. Not me...