From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12219 invoked by alias); 29 Sep 2005 13:00:28 -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 11975 invoked by uid 22791); 29 Sep 2005 12:59:44 -0000 Received: from lon-del-03.spheriq.net (HELO lon-del-03.spheriq.net) (195.46.50.99) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 29 Sep 2005 12:59:44 +0000 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-03.spheriq.net with ESMTP id j8TCxgAu020334 for ; Thu, 29 Sep 2005 12:59:42 GMT Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-01.spheriq.net with ESMTP id j8TCxe3Y017738 for ; Thu, 29 Sep 2005 12:59:41 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id j8TCxdOY006051 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 29 Sep 2005 12:59:40 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 63566DA43; Thu, 29 Sep 2005 12:59:30 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 0FA5A471E7; Thu, 29 Sep 2005 13:02:10 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C10AA7599D; Thu, 29 Sep 2005 13:02:09 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 544AA471D7; Thu, 29 Sep 2005 13:02:09 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.4.4-GR) with ESMTP id BZX02089 (AUTH "andrew stubbs"); Thu, 29 Sep 2005 13:59:32 +0100 (BST) Message-ID: <433BE4EE.6040100@st.com> Date: Thu, 29 Sep 2005 13:00:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: David Lamy-Charrier Cc: gdb@sources.redhat.com Subject: Re: Convenience variable for filename in add-symbol-file not expanded References: <200509291235.j8TCZHg16388@haiti.swb.siemens.de> <6541ed4c0509290550663f5331@mail.gmail.com> In-Reply-To: <6541ed4c0509290550663f5331@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 2.3.0 X-SW-Source: 2005-09/txt/msg00243.txt.bz2 David Lamy-Charrier wrote: > Dieter, > > Thanks for your response, but your solution allows to expand > convenience variable used > for section address parameter, I want to expand a convenience variable > for the filename parameter, so instead of value_as_address() it should > be a kind of value_as_string... I wanted to do much the same thing a while back. Unless I am very much mistaken, there is no way to assign a string to a convenience variable. The nearest you can get is to place it in the inferior program's memory somewhere (perhaps using malloc, or some fixed location) and then assign a pointer to the variable. Obviously you can't do this until there is some memory to write to. However, you could extend the patch to expect a 'char *' variable for the name. Also, all convenience variables are wiped by the file and symbol-file commands (because their types disappear along with the old symbol table), so they aren't that convenient for scripting this kind of thing. Andrew