From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3872 invoked by alias); 25 May 2010 17:23:56 -0000 Received: (qmail 3863 invoked by uid 22791); 25 May 2010 17:23:55 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 May 2010 17:23:44 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 620722BABFD; Tue, 25 May 2010 13:23:42 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Z4xbUPsk1m0u; Tue, 25 May 2010 13:23:42 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0719E2BABFB; Tue, 25 May 2010 13:23:42 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5D948F58FA; Tue, 25 May 2010 10:23:32 -0700 (PDT) Date: Tue, 25 May 2010 17:27:00 -0000 From: Joel Brobecker To: Michael Snyder Cc: "gdb-patches@sourceware.org" Subject: Re: [RFA] maint.exp miscexprs.exp nodebug.exp send_gdb / gdb_test Message-ID: <20100525172332.GX3019@adacore.com> References: <4BF5CF46.4000105@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BF5CF46.4000105@vmware.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00568.txt.bz2 > 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? > + -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. -- Joel