From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 566 invoked by alias); 27 Feb 2003 14:23:32 -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 552 invoked from network); 27 Feb 2003 14:23:32 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 27 Feb 2003 14:23:32 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18oQpe-0003l5-00; Thu, 27 Feb 2003 10:24:26 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18oOwN-0000sA-00; Thu, 27 Feb 2003 09:23:15 -0500 Date: Thu, 27 Feb 2003 14:23:00 -0000 From: Daniel Jacobowitz To: "Fyles, Matthew" Cc: gdb@sources.redhat.com Subject: Re: String handling in GDB command language variables Message-ID: <20030227142315.GA3266@nevyn.them.org> Mail-Followup-To: "Fyles, Matthew" , gdb@sources.redhat.com References: <9FF3133289A7A84E81E2ED8F5E56B379537D94@sh-uk-ex01.uk.w2k.superh.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9FF3133289A7A84E81E2ED8F5E56B379537D94@sh-uk-ex01.uk.w2k.superh.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00579.txt.bz2 On Thu, Feb 27, 2003 at 09:13:55AM -0000, Fyles, Matthew wrote: > Just a quick question about the string handling capability of the GDB > command language. > > set $test="mystring" does not work but defining a procedure and passing > a string in as an argument does, is there any further documentation > anywhere about the capabilities of the language other than the > information available in the user documentation. > > Is this a feature that has been considered in the past and not > implemented or am I just not understanding the syntax for achieving > this. When you say "mystring" in the GDB command language, what you really get is malloc(9) called in the target program and "mystring" copied into it. However, you didn't say what version of GDB you were using. I just tried it in 5.3: (gdb) set $a = "a" (gdb) p $a $1 = 0x8244708 "a" -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer