From: "Jakob Engblom" <jakob@virtutech.com>
To: <tromey@redhat.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: Wed, 02 Dec 2009 17:46:00 -0000 [thread overview]
Message-ID: <003a01ca7377$681a58a0$384f09e0$@com> (raw)
In-Reply-To: <m3pr6yo5f4.fsf@fleche.redhat.com>
> 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.
I see. I had believed that the gdb command-line was more general than that.
Sorry for my lack of insight. That's why I did not say "we should do this", just
asking if this would work.
> 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.
On the other hand, in a script, can't you do this in two steps?
Add a command to build strings into variables, and then use that variable in teh
command?
Gdb> concat $n "foo" $a
Gdb> save $n
?
Best regards,
/jakob
_______________________________________________________
Jakob Engblom, PhD, Technical Marketing Manager
Virtutech Direct: +46 8 690 07 47
Drottningholmsvägen 22 Mobile: +46 709 242 646
11243 Stockholm Web: www.virtutech.com
Sweden
________________________________________________________
prev parent reply other threads:[~2009-12-02 17:46 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
2009-12-02 17:46 ` Jakob Engblom [this message]
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='003a01ca7377$681a58a0$384f09e0$@com' \
--to=jakob@virtutech.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=msnyder@vmware.com \
--cc=teawater@gmail.com \
--cc=tromey@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