public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Michael Chastain <mec.gnu@mindspring.com>
To: bob@brasko.net
Cc: gdb@sources.redhat.com
Subject: Re: GDB/MI Output Syntax
Date: Thu, 26 Aug 2004 20:44:00 -0000	[thread overview]
Message-ID: <412E4B96.nailMU21D4LDE@mindspring.com> (raw)
In-Reply-To: <20040826183134.GA20902@white>

Bob Rossi <bob@brasko.net> wrote:
> Hmmm, this are some ideas, what do you think?
>    1. Run gdb through tee and pipe only GDB's stdout to a place where we
>       can validate it's output.
>    2. Have GDB output it's stdout to 2 places somehow, similar to the
>    idea above (except maybe a new GDB logging feature), so that the output 
>    can be parsed.
>    3. Create a new process, that invokes GDB, validates the output, and
>    output's exactly what GDB used to output.
>    4. Somehow parse the output of GDB, through tcl like you are
>    suggesting?

I think we won't get to a solution today.

It's really a problem at the dejagnu/testsuite level.  We've got this
output stream, but it's mixed in with "PASS: foo" and "Executing on
host: bar" in gdb.log.

At the test suite level, the TCL code is holding the output and
could do something with it.  But it's nontrivial for TCL code to
interface with a C library.  (I'm not about to rebuild the 'expect'
binary).

Also this might relate to "separating gdb output from inferior output".

bob> I don't use this rule in the grammar. I have the lexer return NEWLINE.

That's okay, too.  Either way is fine with me.

I'd like your grammar and the reference grammar to be identical,
so that we know that the reference grammar actually works.

Grammar comments:

===

Can you write the terminal symbols in ALL CAPS;
that's the usual style for bison grammars.

I think the terminals are:

  STRING C_STRING CR LF TOKEN
  "(gdb)" "^" "*" "+" "=" "," "~" "@" "&"
  "done" "running" "connected" "error" "exit"
  "stopped"

The literal strings are okay as is, but I'd really like
symbolic terminals capitalized.

===

Hmmm, in my gdb.log, there is a space in "(gdb) ^M", but in
the gdb.texinfo grammar and the new grammar, there is no space.

===

In the result_record rules:

  result_record -> opt_token "^" result_class
  result_record -> opt_token "^" result_class "," opt_result_list

In the second form, if there is a ",", there must be at least
one result.  So the last symbol should be result_list rather
than opt_result_list.

===

Same deal with the async_output rule:

  async_output -> async_class "," opt_result_list

This should be like result_record.  If opt_result_list is empty
then there is no "," .  Example:

  403*stopped^M
  (gdb) ^M

In fact async_output doesn't add much value to the grammar.
How about just:

  async_record -> opt_token async_record_class async_class
  async_record -> opt_token async_record_class async_class "," result_list

  reply	other threads:[~2004-08-26 20:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2005-01-06  0:28 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
     [not found] <1093622671.2836.ezmlm@sources.redhat.com>
2004-08-27 17:56 ` Jim Ingham
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
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=412E4B96.nailMU21D4LDE@mindspring.com \
    --to=mec.gnu@mindspring.com \
    --cc=bob@brasko.net \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).