public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: Convenience variable for filename in add-symbol-file not expanded
@ 2005-09-29 12:36 Ruppert
  2005-09-29 12:50 ` David Lamy-Charrier
  0 siblings, 1 reply; 6+ messages in thread
From: Ruppert @ 2005-09-29 12:36 UTC (permalink / raw)
  To: gdb



>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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Convenience variable for filename in add-symbol-file not expanded
@ 2005-09-29 10:22 David Lamy-Charrier
  0 siblings, 0 replies; 6+ messages in thread
From: David Lamy-Charrier @ 2005-09-29 10:22 UTC (permalink / raw)
  To: GDB List

I am using the add-symbol-file command from a gdb script to
dynamically add symbols at runtime.
So I want to use a convenience variable for the filename parameter of
add-symbol-file, I tested with gdb 6.3.1 for mingw and looked in the
code but convenience variables as filename are not expanded.

I found this thread:
http://www.cygwin.com/ml/gdb/2002-11/msg00275.html
But I do not know the current status of it.

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...) ?

Thanks in advance,
David

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-29 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-29 12:36 Convenience variable for filename in add-symbol-file not expanded Ruppert
2005-09-29 12:50 ` David Lamy-Charrier
2005-09-29 13:00   ` Andrew STUBBS
2005-09-29 13:38     ` David Lamy-Charrier
2005-09-29 14:04       ` Andrew STUBBS
  -- strict thread matches above, loose matches on Subject: below --
2005-09-29 10:22 David Lamy-Charrier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).