From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30332 invoked by alias); 27 Feb 2003 16:43:43 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30323 invoked from network); 27 Feb 2003 16:43:43 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 27 Feb 2003 16:43:43 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BE9FE2A9C; Thu, 27 Feb 2003 11:45:57 -0500 (EST) Message-ID: <3E5E40C5.3080700@redhat.com> Date: Thu, 27 Feb 2003 16:43:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: "Fyles, Matthew" , gdb@sources.redhat.com Subject: Re: String handling in GDB command language variables References: <9FF3133289A7A84E81E2ED8F5E56B379537DB7@sh-uk-ex01.uk.w2k.superh.com> <20030227144022.GA3707@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00583.txt.bz2 > The command language always mimics the current source language being > debugged, defaulting to C; C doesn't have a string type. That's the > historical justification anyway. > > If there's a consensus that a string type would be useful, it could > probably be done. I think it might be a good idea; we could use > strings for arguments to gdb commands, etc. However I'm not sure of > the syntax. DanielJ's comment, GDB's current behavior is to always a malloc(), store the value in the target, and then create a `char *' `struct value'. Is there anything in the `rule book' that says that GDB can be lazy (when given "string" create a `char[]' `struct value' and then only allocate space / create the pointer when the value is needed by the target)? Is this trivial? Is this needed? "no"? "no"? "yes"? Andrew