From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21476 invoked by alias); 1 Dec 2009 19:35:15 -0000 Received: (qmail 21460 invoked by uid 22791); 1 Dec 2009 19:35:14 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Dec 2009 19:34:28 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB1JXgre027756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Dec 2009 14:33:42 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB1JXdvt013512; Tue, 1 Dec 2009 14:33:39 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id nB1JXZWA026054; Tue, 1 Dec 2009 14:33:36 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 5D484378190; Tue, 1 Dec 2009 12:33:35 -0700 (MST) From: Tom Tromey To: "Jakob Engblom" Cc: "'Joel Brobecker'" , "'Michael Snyder'" , , "'Hui Zhu'" Subject: Re: [RFC] syntax change for "record save" References: <4B0EF39A.10802@vmware.com> <20091127013738.GL18141@adacore.com> <00b601ca7285$a3ff39f0$ebfdadd0$@com> Reply-To: tromey@redhat.com Date: Tue, 01 Dec 2009 19:35:00 -0000 In-Reply-To: <00b601ca7285$a3ff39f0$ebfdadd0$@com> (Jakob Engblom's message of "Tue, 1 Dec 2009 13:56:03 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00009.txt.bz2 >>>>> "Jakob" == Jakob Engblom 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