This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Convenience variable for filename in add-symbol-file not expanded



>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]