This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Convenience variable for filename in add-symbol-file not expanded
- From: Ruppert <dieter_ruppert at siemens dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 29 Sep 2005 14:35:15 +0200 (MEST)
- Subject: Re: Convenience variable for filename in add-symbol-file not expanded
- Reply-to: Ruppert <dieter_ruppert at siemens dot com>
>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] == '$')
{
struct value* valx;
valx = value_of_internalvar(lookup_internalvar(&exp[1]));
if (TYPE_CODE( VALUE_TYPE(valx)) != TYPE_CODE_INT)
error("Invalid type given as section address.");
addr = value_as_address(valx);
}
else
{
... the current code goes here
HTH
regards
d.ruppert
dieter_ruppert@siemens.com