From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6199 invoked by alias); 29 Sep 2005 12:50:20 -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 6111 invoked by uid 22791); 29 Sep 2005 12:50:07 -0000 Received: from nproxy.gmail.com (HELO nproxy.gmail.com) (64.233.182.206) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 29 Sep 2005 12:50:07 +0000 Received: by nproxy.gmail.com with SMTP id l37so607709nfc for ; Thu, 29 Sep 2005 05:50:05 -0700 (PDT) Received: by 10.49.2.4 with SMTP id e4mr43387nfi; Thu, 29 Sep 2005 05:50:04 -0700 (PDT) Received: by 10.48.157.14 with HTTP; Thu, 29 Sep 2005 05:50:04 -0700 (PDT) Message-ID: <6541ed4c0509290550663f5331@mail.gmail.com> Date: Thu, 29 Sep 2005 12:50:00 -0000 From: David Lamy-Charrier Reply-To: David Lamy-Charrier To: gdb@sources.redhat.com Subject: Re: Convenience variable for filename in add-symbol-file not expanded In-Reply-To: <200509291235.j8TCZHg16388@haiti.swb.siemens.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200509291235.j8TCZHg16388@haiti.swb.siemens.de> X-SW-Source: 2005-09/txt/msg00242.txt.bz2 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... Regards, David On 9/29/05, Ruppert wrote: > > > >Does anyone know if a patch exists for that ? > >If not, could you give me some hints to implement it (any > >parse_and_eval_string or equivalent i can use...) ? > > > > If you can't find a more general solution: > I got this working with the following local hack in > parse-and_eval_address (this was gdb-6.1): > > CORE_ADDR addr; > if (exp[0] =3D=3D '$') > { > > struct value* valx; > valx =3D value_of_internalvar(lookup_internalvar(&exp[1])); > if (TYPE_CODE( VALUE_TYPE(valx)) !=3D TYPE_CODE_INT) > error("Invalid type given as section address."); > addr =3D value_as_address(valx); > } > else > { > > ... the current code goes here > > > HTH > > regards > d.ruppert > dieter_ruppert@siemens.com > >