Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: David Lamy-Charrier <david.lamy@gmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: Convenience variable for filename in add-symbol-file not expanded
Date: Thu, 29 Sep 2005 13:00:00 -0000	[thread overview]
Message-ID: <433BE4EE.6040100@st.com> (raw)
In-Reply-To: <6541ed4c0509290550663f5331@mail.gmail.com>

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


  reply	other threads:[~2005-09-29 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-29 12:36 Ruppert
2005-09-29 12:50 ` David Lamy-Charrier
2005-09-29 13:00   ` Andrew STUBBS [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=433BE4EE.6040100@st.com \
    --to=andrew.stubbs@st.com \
    --cc=david.lamy@gmail.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox