From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26312 invoked by alias); 11 Mar 2008 06:58:37 -0000 Received: (qmail 26304 invoked by uid 22791); 11 Mar 2008 06:58:37 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Mar 2008 06:58:17 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m2B6wFWC005776 for ; Tue, 11 Mar 2008 02:58:15 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2B6wFfT002630 for ; Tue, 11 Mar 2008 02:58:15 -0400 Received: from opsy.redhat.com (vpn-248-63.boston.redhat.com [10.13.248.63]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2B6wF8c026342; Tue, 11 Mar 2008 02:58:15 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 880333781C4; Tue, 11 Mar 2008 00:06:56 -0600 (MDT) To: gdb-patches@sourceware.org Subject: Re: [RFC] Strings and arrays without malloc References: <20080309161335.GA26917@caradoc.them.org> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Tue, 11 Mar 2008 06:58:00 -0000 In-Reply-To: <20080309161335.GA26917@caradoc.them.org> (Daniel Jacobowitz's message of "Sun\, 9 Mar 2008 12\:13\:35 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00113.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> This patch allows a number of expressions to work without Daniel> having to call malloc. Thanks. First a comment on your patch: in case it matters, I think it is fine as is. I applied this and then my convenience function patch on top of it. Then, it was trivial to extend that to allow string-valued "show": (gdb) p $(show lang) $1 = "auto; currently c" I started adding regex support, then thought to take a moment to think about what functions I would really like to have. Of course, this list turned out to be basically everything -- access to all the attributes of breakpoints, watchpoints, frames, utility commands, etc. It is pretty daunting, but of course fun in a way. In the end I think it would be preferable to just use Python for all this stuff. That way all the access code only needs to be done once. IMO the $(...) syntax should simply eval the contents as a Python expression. let me know what you think, Tom