Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb-patches@sourceware.org, drow@false.org
Subject: Re: PING [RFC] Testsuite: permit simple transformation of gdb_expect code
Date: Wed, 16 Jun 2010 14:14:00 -0000	[thread overview]
Message-ID: <20100616141356.GA32701@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <000901cb0c52$b7d767b0$27863710$@muller@ics-cnrs.unistra.fr>

On Tue, 15 Jun 2010 08:19:30 +0200, Pierre Muller wrote:
>   use only a procedure, but this would mean
> that there is no way to insert its code inside
> gdb.exp itself.

I do not understand this part.


>   This allows to use either 
> unset transform_gdb_expect_code 
> or
> set transform_gdb_expect_code ""
> to disable the transformation at any point
> in the testsuite.

With the patch proposed below one defines it using:
	proc transform_gdb_expect_code { expcode } {
	    verbose -log "code = <$expcode>"
	    return $expcode
	}
and undefines it using:
	rename transform_gdb_expect_code ""


Thanks,
Jan


2010-06-16  Pierre Muller  <muller@ics.u-strasbg.fr>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* lib/gdb.exp (gdb_expect): Call transform_gdb_expect_code procedure
	if it exists.

--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2178,6 +2178,13 @@ proc gdb_expect { args } {
 	}
     }
 
+    # The global procedure transform_gdb_expect_code can transform the code
+    # parameter of gdb_expect call in order to cope for some target dependant
+    # problems.
+    if { "[info procs transform_gdb_expect_code]" != "" } {
+	set expcode [transform_gdb_expect_code $expcode]
+    }
+
     global suppress_flag;
     global remote_suppress_flag;
     if [info exists remote_suppress_flag] {


  reply	other threads:[~2010-06-16 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15  6:20 Pierre Muller
2010-06-16 14:14 ` Jan Kratochvil [this message]
2010-06-16 15:34   ` Pierre Muller

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=20100616141356.GA32701@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /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