From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23748 invoked by alias); 27 Feb 2003 19:06:16 -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 23740 invoked from network); 27 Feb 2003 19:06:15 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 27 Feb 2003 19:06:15 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18oVFV-0004Ej-00 for ; Thu, 27 Feb 2003 15:07:25 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18oTMD-0002SG-00 for ; Thu, 27 Feb 2003 14:06:13 -0500 Date: Thu, 27 Feb 2003 19:06:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: String handling in GDB command language variables Message-ID: <20030227190612.GA9375@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <9FF3133289A7A84E81E2ED8F5E56B379537DB7@sh-uk-ex01.uk.w2k.superh.com> <20030227144022.GA3707@nevyn.them.org> <3E5E40C5.3080700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E5E40C5.3080700@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00588.txt.bz2 On Thu, Feb 27, 2003 at 11:45:57AM -0500, Andrew Cagney wrote: > > >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"? Those are my guesses, too. I think that this change could also be related to the kfail in our testsuite dealing with character array types... -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer