Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Ingham <jingham@apple.com>
To: gdb@sources.redhat.com
Subject: Re: GDB/MI Output Syntax
Date: Fri, 27 Aug 2004 17:56:00 -0000	[thread overview]
Message-ID: <76E69B58-F852-11D8-8E70-000A958F4C44@apple.com> (raw)
In-Reply-To: <1093622671.2836.ezmlm@sources.redhat.com>

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 <mec.gnu@mindspring.com>
> 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 <keiths@redhat.com> 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.
>
>


       reply	other threads:[~2004-08-27 17:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1093622671.2836.ezmlm@sources.redhat.com>
2004-08-27 17:56 ` Jim Ingham [this message]
2004-08-27 19:12   ` Michael Chastain
2005-01-05 23:27     ` Bob Rossi
2005-01-06  4:48       ` Eli Zaretskii
2005-01-06 23:31         ` Bob Rossi
2005-01-07  0:36           ` Jim Ingham
2005-01-07  1:12             ` Bob Rossi
2005-01-07  3:12               ` Russell Shaw
2005-01-11 19:35                 ` Bob Rossi
2005-01-13  2:23                   ` Bob Rossi
2005-01-13  2:46                   ` Intrusive GDB Symbol Lookup when debugging remotely David Steven Trollope
2005-01-22  4:25                     ` Dave Trollope
2005-01-24 19:48                       ` Andrew Cagney
2005-01-24 19:54                         ` David Steven Trollope
2005-03-18 16:29                     ` Linux Realtime Scheduling Option David Steven Trollope
2005-03-18 18:12                       ` Daniel Jacobowitz
2005-03-21 19:21                         ` David Steven Trollope
2005-03-21 19:33                           ` Daniel Jacobowitz
2005-03-22  3:04                             ` Dave Trollope
2005-03-22  4:06                               ` Daniel Jacobowitz
2005-01-06  0:28 GDB/MI Output Syntax Paul Schlie
2005-01-06  0:32 ` Kip Macy
2005-01-06  0:49   ` Paul Schlie
2005-01-06  1:10 ` Bob Rossi
2005-01-06  1:36   ` Paul Schlie
  -- strict thread matches above, loose matches on Subject: below --
2004-08-25 15:44 Bob Rossi
2004-08-25 15:57 ` Michael Chastain
2004-08-25 19:37   ` Bob Rossi
2004-08-26 14:01     ` Michael Chastain
2004-08-26 18:31       ` Bob Rossi
2004-08-26 20:44         ` Michael Chastain
2004-08-26 20:52           ` Keith Seitz
2004-08-26 22:16             ` Michael Chastain
2004-08-26 22:03           ` Bob Rossi
2004-08-26 23:06             ` Michael Chastain
2004-08-26 21:13 ` Andrew Cagney
2004-08-26 21:25   ` Bob Rossi
2004-08-26 22:46     ` Michael Chastain
2004-08-27 10:14       ` Eli Zaretskii
2004-08-26 22:41   ` Michael Chastain
2004-08-24  3:12 Bob Rossi
2004-08-24  4:15 ` Michael Chastain
2004-08-24 12:30   ` Bob Rossi
2004-08-24 12:50     ` Michael Chastain
2004-08-24 18:59   ` Andrew Cagney
2004-08-24 19:07     ` Bob Rossi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76E69B58-F852-11D8-8E70-000A958F4C44@apple.com \
    --to=jingham@apple.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox