From: David Lamy-Charrier <david.lamy@gmail.com>
To: gdb@sources.redhat.com
Subject: Re: Convenience variable for filename in add-symbol-file not expanded
Date: Thu, 29 Sep 2005 13:38:00 -0000 [thread overview]
Message-ID: <6541ed4c0509290637259f1b9f@mail.gmail.com> (raw)
In-Reply-To: <433BE4EE.6040100@st.com>
Thanks Andrew,
I already have a static buffer in the inferior program containing the
path to the file I want to use.
You mean that I should declare a pointer to the variable in the
inferior program too ?
And then how can I access the pointed value in gdb, using
value_of_internalvar() or parse_and_eval_address() or anything else) ?
Thanks,
David
> 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
>
next prev parent reply other threads:[~2005-09-29 13:38 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
2005-09-29 13:38 ` David Lamy-Charrier [this message]
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=6541ed4c0509290637259f1b9f@mail.gmail.com \
--to=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