From: Richard Sharpe <rsharpe@richardsharpe.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: Processing of convenience variables for scripts ...
Date: Sat, 07 Dec 2002 08:50:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0212070909270.2098-100000@ns.aus.com> (raw)
In-Reply-To: <20021206164214.GA27660@nevyn.them.org>
On Fri, 6 Dec 2002, Daniel Jacobowitz wrote:
> On Fri, Dec 06, 2002 at 08:57:07AM -0800, Richard Sharpe wrote:
> > Hi,
> >
> > In looking at this issue, it seems that much of the existing code that
> > deals with variables is centered around printing:
> >
> > value_print (var->value, gdb_stdout, 0, Val_pretty_default);
> >
> > While it seems that I could mess with providing new functions for a stream
> > structure that I could retrieve strings from, is there a simpler way.
> >
> > I envision something like
> >
> > var1 = value_to_string (var->value);
> >
> > And then construct a new command, and pass it through the standard routine
> > that processes commands.
> >
> > However, it seems that things are not that simple :-)
>
> You're looking in the wrong place, I'd say. Look in parse.c for the
> call to:
> lookup_internalvar (copy_name (str) + 1)
OK, but the problem there is that lookup_internalvar returns a struct
internalvar *. While there is a function value_of_internal var (also in
values.c), it returns a struct value *.
I need the value of an internal var as something approximating a C
string, and the only functions that deal with displaying the value of an
internal variable (or any variable, it seems) is value_print, which wants
a struct ui_file *. Or so it seems?
Have the recreational drugs finally proven too much, or have I got it
right here?
Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com
next prev parent reply other threads:[~2002-12-07 16:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-06 8:30 Richard Sharpe
2002-12-06 8:41 ` Daniel Jacobowitz
2002-12-06 8:54 ` Fernando Nasser
2002-12-06 11:57 ` Richard Sharpe
2002-12-06 14:53 ` Fernando Nasser
2002-12-06 17:17 ` Daniel Jacobowitz
2002-12-07 8:50 ` Richard Sharpe [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-20 0:48 Richard Sharpe
2002-11-20 6:13 ` Daniel Jacobowitz
2002-11-20 8:32 ` Andrew Cagney
2002-11-20 8:36 ` Daniel Jacobowitz
2002-11-20 9:28 ` Richard Sharpe
2002-11-20 10:36 ` Daniel Jacobowitz
2002-11-20 21:40 ` Eli Zaretskii
2002-12-05 16:52 ` Fernando Nasser
2002-12-08 11:36 ` Doug Evans
2002-12-08 12:30 ` Daniel Jacobowitz
2002-12-08 12:52 ` Doug Evans
2002-12-08 11:16 ` Doug Evans
2002-12-08 11:31 ` Richard Sharpe
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=Pine.LNX.4.33.0212070909270.2098-100000@ns.aus.com \
--to=rsharpe@richardsharpe.com \
--cc=drow@mvista.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