Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <brobecke@sourceware.org>, <gdb-patches@sourceware.org>
Subject: [Cygwin problem]:with banned variables
Date: Sat, 19 Jun 2010 08:42:00 -0000	[thread overview]
Message-ID: <001201cb0f8b$472f8b00$d58ea100$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20100517171128.29087.qmail@sourceware.org>

  Following this patch, 
I can't run the testsuite for Cygwin anymore :(

See this:
$ make check RUNTESTFLAGS="gdb.base/a*.exp"
Nothing to be done for all...
rootme=`pwd`; export rootme; srcdir=../../../src/gdb/testsuite ; export
srcdir ;
 EXPECT=`if [ -f ${rootme}/../../expect/expect ] ; then echo
${rootme}/../../exp
ect/expect ; else echo expect ; fi` ; export EXPECT ; EXEEXT=.exe ; export
EXEEX
T ;
LD_LIBRARY_PATH=$rootme/../../expect:$rootme/../../libstdc++:$rootme/../../t
k/unix:$rootme/../../tcl/unix:$rootme/../../bfd:$rootme/../../opcodes:$LD_LI
BRAR
Y_PATH; export LD_LIBRARY_PATH; if [ -f ${rootme}/../../expect/expect ] ;
then T
CL_LIBRARY=${srcdir}/../../tcl/library ; export TCL_LIBRARY ; fi ; ` if [ -f
${s
rcdir}/../../dejagnu/runtest ]; then echo ${srcdir}/../../dejagnu/runtest;
else
if [ "i686-pc-cygwin" = "i686-pc-cygwin" ]; then echo runtest; else
t='s,y,y,';
echo runtest | sed -e $t; fi; fi` gdb.base/a*.exp
WARNING: Couldn't find the global config file.
Test Run By Pierre on Sat Jun 19 06:46:45 2010
Native configuration is i686-pc-cygwin

                === gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
targe
t.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for
target.
Using ../../../src/gdb/testsuite/config/unix.exp as tool-and-target-specific
int
erface file.
Running ../../../src/gdb/testsuite/gdb.base/a2-run.exp ...
FAIL: gdb.base/a2-run.exp: run "a2-run" with shell (the program exited)
Running ../../../src/gdb/testsuite/gdb.base/advance.exp ...
can't set "prms_id": prms_id
    while executing
"set prms_id    0"
    (procedure "runtest" line 10)
    invoked from within
"runtest $test_name"
    ("foreach" body line 24)
    invoked from within
"foreach test_name $testlist {
                if { ${ignoretests} != "" } {


  It appears that pmrs_id and bug_id are reset to 0 inside
/usr/share/dejagnu/runtest.exp
in proc runtest
  I know that Cygwin uses an outdated expect,
but I don't understand why this error only shows up
for Cygwin.
  The lastest 


If I modify lib/gdb.exp
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.150
diff -r1.150 gdb.exp
100a101,106
> # The variable transform_gdb_expect_code can be set to the name of
> # a procedure that will transform the code parameter of gdb_expect call
> # in order to cope for some target dependant problems
> # it can also be reset to an empty string to disable that operation
> global transform_gdb_expect_code
>
2180a2187,2194
>     global transform_gdb_expect_code;
>     if [info exists transform_gdb_expect_code] {
>       if { "[info procs $transform_gdb_expect_code]" != "" } {
>           set expcode [$transform_gdb_expect_code $expcode];
>       } elseif { "$transform_gdb_expect_code" != "" } {
>           perror "Procedure $transform_gdb_expect_code unknown"
>       }
>     }
2522a2537,2541
> proc trace_write { varname args } {
>   upvar #0 $varname var
>   puts "Error: trying to write $varname to \"$var\""
> }
>
2535c2554
<         trace variable "$banned_var" w error
---
>         trace variable "$banned_var" w "trace_write $banned_var"

  Then I also see, on x86_64 linux machine:

muller@gcc16:~/gdb/build-norm/gdb/testsuite$ make check
RUNTESTFLAGS="gdb.base/
a*.exp"
Nothing to be done for all...
rootme=`pwd`; export rootme; srcdir=../../../src/gdb/testsuite ; export
srcdir ;
 EXPECT=`if [ -f ${rootme}/../../expect/expect ] ; then echo
${rootme}/../../exp
ect/expect ; else echo expect ; fi` ; export EXPECT ; EXEEXT= ; export
EXEEXT ;
LD_LIBRARY_PATH=$rootme/../../expect:$rootme/../../libstdc++:$rootme/../../t
k/un
ix:$rootme/../../tcl/unix:$rootme/../../bfd:$rootme/../../opcodes:$LD_LIBRAR
Y_PA
TH; export LD_LIBRARY_PATH; if [ -f ${rootme}/../../expect/expect ] ; then
TCL_L
IBRARY=${srcdir}/../../tcl/library ; export TCL_LIBRARY ; fi ; ` if [ -f
${srcdi
r}/../../dejagnu/runtest ]; then echo ${srcdir}/../../dejagnu/runtest; else
if [
 "x86_64-unknown-linux-gnu" = "x86_64-unknown-linux-gnu" ]; then echo
runtest; e
lse t='s,y,y,'; echo runtest | sed -e $t; fi; fi` gdb.base/a*.exp
Test Run By muller on Sat Jun 19 09:48:09 2010
Native configuration is x86_64-unknown-linux-gnu

                === gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
targe
t.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for
target.
Using ../../../src/gdb/testsuite/config/unix.exp as tool-and-target-specific
int
erface file.
Running ../../../src/gdb/testsuite/gdb.base/auxv.exp ...
WARNING: can't generate a core file - core tests suppressed - check ulimit
-c
FAIL: gdb.base/auxv.exp: generate native core dump
Running ../../../src/gdb/testsuite/gdb.base/args.exp ...
Error: trying to write prms_id to "0"
Error: trying to write bug_id to "0"
Running ../../../src/gdb/testsuite/gdb.base/assign.exp ...
Error: trying to write prms_id to "0"
Error: trying to write prms_id to "0"
Error: trying to write bug_id to "0"
Error: trying to write bug_id to "0"
Running ../../../src/gdb/testsuite/gdb.base/all-bin.exp ...

So it seems that the difference is in the "error" internal command...


Pierre

  

> -----Message d'origine-----
> De : gdb-cvs-owner@sourceware.org [mailto:gdb-cvs-owner@sourceware.org]
> De la part de brobecke@sourceware.org
> Envoyé : Monday, May 17, 2010 7:11 PM
> À : gdb-cvs@sourceware.org
> Objet : src/gdb/testsuite ChangeLog lib/gdb.exp
> 
> CVSROOT:	/cvs/src
> Module name:	src
> Changes by:	brobecke@sourceware.org	2010-05-17 17:11:28
> 
> Modified files:
> 	gdb/testsuite  : ChangeLog
> 	gdb/testsuite/lib: gdb.exp
> 
> Log message:
> 	testsuite: Prevent writes to prms_id and bug_id.
> 
> 	gdb/testsuite/ChangeLog:
> 
> 	* lib/gdb.exp (banned_variables): New variable/constant.
> 	(gdb_init): Add write trace on variables listed in
> banned_variables.
> 	(gdb_finish): Remove write traces on variables listed in
> 	banned_variables.
> 
> Patches:
> http://sourceware.org/cgi-
> bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2267&r
> 2=1.2268
> http://sourceware.org/cgi-
> bin/cvsweb.cgi/src/gdb/testsuite/lib/gdb.exp.diff?cvsroot=src&r1=1.146&
> r2=1.147



       reply	other threads:[~2010-06-19  8:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100517171128.29087.qmail@sourceware.org>
2010-06-19  8:42 ` Pierre Muller [this message]
2010-06-20 14:59   ` [RFA] Fix Cygwin problem with " Pierre Muller
2010-06-21 17:08     ` Joel Brobecker
2010-06-22  7:22       ` 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='001201cb0f8b$472f8b00$d58ea100$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=brobecke@sourceware.org \
    --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