Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Jakob Engblom" <jakob@virtutech.com>
Cc: "'Joel Brobecker'" <brobecker@adacore.com>,
	        "'Michael Snyder'" <msnyder@vmware.com>,
	<gdb@sourceware.org>,         "'Hui Zhu'" <teawater@gmail.com>
Subject: Re: [RFC] syntax change for "record save"
Date: Tue, 01 Dec 2009 19:35:00 -0000	[thread overview]
Message-ID: <m3pr6yo5f4.fsf@fleche.redhat.com> (raw)
In-Reply-To: <00b601ca7285$a3ff39f0$ebfdadd0$@com> (Jakob Engblom's message of 	"Tue, 1 Dec 2009 13:56:03 +0100")

>>>>> "Jakob" == Jakob Engblom <jakob@virtutech.com> writes:

Jakob> So we would do something like this:
simics> save ("file." + $a)     
Jakob> (when the first argument to + is a string, the next argument is
Jakob> forced to a string)

Jakob> I think supporting string generation would solve many more
Jakob> problems easily.

The problem is that it is not obvious how to integrate this into the
existing gdb CLI.  The CLI is not like a normal programming language,
with a regular syntax and a parser.  Any regularity is just by
convention; each command is just passed a char* that it parses itself.

Of course, we could invent something.  We could even turn the CLI into a
much more expressive language.  I'd rather not, though -- we have Python
for that, and I think it is generally better to just reuse an existing
language than to try to invent a new one.

Jakob> The save name INDEX to me seems silly, if you are doing this
Jakob> manually, why don't you just type a different name each time?

Yeah, presumably this is only done via scripting.  That's why I think it
is ok if the spelling of the commands is a bit verbose.

Tom


  reply	other threads:[~2009-12-01 19:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27  2:25 Michael Snyder
2009-11-27  7:55 ` Joel Brobecker
2009-11-27 15:17   ` Hui Zhu
2009-11-30 12:37   ` Michael Snyder
2009-12-01 12:56   ` Jakob Engblom
2009-12-01 19:35     ` Tom Tromey [this message]
2009-12-02 17:46       ` Jakob Engblom

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=m3pr6yo5f4.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=jakob@virtutech.com \
    --cc=msnyder@vmware.com \
    --cc=teawater@gmail.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