From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21205 invoked by alias); 27 Aug 2004 17:56:52 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21196 invoked from network); 27 Aug 2004 17:56:51 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 27 Aug 2004 17:56:51 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id i7RHwPwm020234 for ; Fri, 27 Aug 2004 10:58:25 -0700 (PDT) Received: from relay1.apple.com (relay1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 27 Aug 2004 10:56:50 -0700 Received: from [17.201.22.240] (inghji.apple.com [17.201.22.240]) by relay1.apple.com (8.12.11/8.12.11) with ESMTP id i7RHumhD023933 for ; Fri, 27 Aug 2004 10:56:49 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v672) In-Reply-To: <1093622671.2836.ezmlm@sources.redhat.com> References: <1093622671.2836.ezmlm@sources.redhat.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <76E69B58-F852-11D8-8E70-000A958F4C44@apple.com> Content-Transfer-Encoding: 7bit From: Jim Ingham Subject: Re: GDB/MI Output Syntax Date: Fri, 27 Aug 2004 17:56:00 -0000 To: gdb@sources.redhat.com X-SW-Source: 2004-08/txt/msg00419.txt.bz2 Nah, this works just fine. The problem is that the sample extension actually adds a command called "sha1". In interactive mode, tcl resolves shortened commands to the full name if the resolution is unique. So if you do: $ tclsh % info commands sha* % package require Tclsha1 0.5 % info commands sha* sha1 % sha -string hello aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d % sha1 -string hello aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d But in script mode, Tcl doesn't complete commands for you (to better catch errors in scripts). So that's why you were getting the error when you tried to use the "sha" command in DejaGnu. If you used the sha1 command, it would work: inghji:tot-shlib-experiment/build/gdb > make check RUNTESTFLAGS="--D1" Nothing to be done for all... rootme=`pwd`; export rootme; \ srcdir=../../../gdb/src/gdb/testsuite ; export srcdir ; \ EXPECT=`if [ -f ${rootme}/../../expect/expect ] ; then echo ${rootme}/../../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ EXEEXT= ; export EXEEXT ; \ RPATH_ENVVAR=$rootme/../../expect:$rootme/../../libstdc++: $rootme/../../tk/unix:$rootme/../../tcl/unix:$rootme/../../bfd: $rootme/../../opcodes:$RPATH_ENVVAR; \ export RPATH_ENVVAR; \ if [ -f ${rootme}/../../expect/expect ] ; then \ TCL_LIBRARY=${srcdir}/../../tcl/library ; \ export TCL_LIBRARY ; fi ; \ /Volumes/ThePlayground/Users/jingham/Work/gdb-sources/tot-shlib- experiment/gdb/src/gdb/../dejagnu/runtest --D1 1: set frame_version 1.4.2.x dbg1.0> package require Tclsha1 0.5 dbg1.1> sha1 -string hello aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d I actually think that building Bob's parser into a Tcl C extension & using that with the DejaGnu testsuite would be brilliant. Not only would it ensure that we keep the output correctly parseable, but it would mean that we could solve the problem the current testsuite has that when you add a field to some mi command (which should be a backwards compatible operation) you have to go fix ALL the test cases. If you used the parser to read the MI output into a Tcl array, then the tests could just query the array for the elements they wanted to test, and not be bothered by elements that they were not concerned with testing. Jim On Aug 27, 2004, at 9:04 AM, gdb-digest-help@sources.redhat.com wrote: > From: Michael Chastain > Date: August 26, 2004 3:16:43 PM PDT > To: keiths@redhat.com > Cc: gdb@sources.redhat.com, bob@brasko.net > Subject: Re: GDB/MI Output Syntax > > > Keith Seitz wrote: >> I've got three letters (okay, words) for you: TEA. >> >> Interfacing Tcl and C is TRIVIAL. >> >> Keith > > I left out a part: it's nontrivial for TCL code that's running in > a TCL interpreter that's already linked into 'expect', a program > that we did not build, to interface with a C library. > > lib/gdb.exp can load the TEA sample shared object without error, but > the > new commands are not available. > > ERROR: (DejaGnu) proc "sha -string hello" does not exist. > > When I run the same 'expect' binary standalone interactively, it can > load the TEA sample library and the new commands are available. Go > figure. > > All the parts are there, but we're not currently using them and they > fail the smoke test. Multiply by a dozen hosts and that's what I call > nontrivial. > >