From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Testsuite: permit simple transformation of gdb_expect code
Date: Thu, 03 Jun 2010 06:40:00 -0000 [thread overview]
Message-ID: <002101cb02e7$90ecf3a0$b2c6dae0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20100602212929.GX3019@adacore.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Wednesday, June 02, 2010 11:29 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] Testsuite: permit simple transformation of gdb_expect
> code
>
> > I would like to insert a no-op change to lib/gdb.exp that allows
> > easily to write a transformation function (that can be inside the
> > target board file). The idea is to simply add a global variable
> > named `transform_gdb_expect_code' that defaults to empty.
>
> No objection from my end in principle; I guess there is no way to
> make that decision automatic? In AdaCore's testsuite, we get
> the version information in GDB and determine from there the host
> and target, and that allows to whether or not certain features
> are available, etc.
>
> In terms of implementation, rather than having an empty global,
> perhaps it'd be just as simple to test its existence? Just thinking
> out loud...
Do you mean the variable or the procedure itself?
I thought about it, but I still didn't really
understand all the tcl command details:
info exists VAR_NAME
will return 1 if VAR_NAME exists
as either a global or a local variable,
but it seems that
info proc PROC_NAME
works as a regular expression,
and can thus return a list containing both PROC_NAME and PROC_NAME_VERSION_2
procedures ...
But I might be wrong.
I am still not very skilled in tcl in general:
does
global VAR;
already create that variable?
or does it just say that that name VAR should be looked up
in global namespace?
If it does not create the variable then
using
global gdb_transform_expect_code;
and
if [info exists gdb_transform_expect_code] {
would be cleaner probably.
I am still so new to tcl that I didn't even
try it out, out of fear that I would not really
correctly interpret the results I see!
Pierre
next prev parent reply other threads:[~2010-06-03 6:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 12:41 Pierre Muller
2010-06-02 21:29 ` Joel Brobecker
2010-06-03 6:40 ` Pierre Muller [this message]
[not found] ` <14482.3657036342$1275547225@news.gmane.org>
2010-06-03 15:40 ` Tom Tromey
2010-06-04 7:35 ` Pierre Muller
[not found] ` <12215.5377561741$1275636939@news.gmane.org>
2010-06-04 16:48 ` Tom Tromey
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='002101cb02e7$90ecf3a0$b2c6dae0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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