Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: [committed] Re: Testcase problem in chng-syms.exp
Date: Fri, 16 Mar 2007 15:33:00 -0000	[thread overview]
Message-ID: <200703161533.l2GFXUQ1006024@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200703100022.l2A0Mleb030342@d12av02.megacenter.de.ibm.com> from "Ulrich Weigand" at Mar 10, 2007 01:22:47 AM

Hello,

> So you'd expect that the output would match the first pattern, right?
> However, it doesn't.  This appears to be caused by the implementation
> of gdb_run_cmd, which ends in:
> 
>     send_gdb "run $args\n"
> # This doesn't work quite right yet.
>     gdb_expect 60 {
>         -re "The program .* has been started already.*y or n. $" {
>             send_gdb "y\n"
>             exp_continue
>         }
>         -re "Starting program: \[^\r\n\]*" {}
>     }
> 
> This means everything up to and including the line "Starting program: ..."
> is swallowed up by this gdb_expect, and the second one in chng-syms.exp
> does see the lines it is looking for any more.

I've now fixed this problem by adding -notransfer to the pattern.
Tested on s390-ibm-linux, s390x-ibm-linux, and spu-elf.  Fixes
the failure on spu-elf.  Committed to mainline.

Bye,
Ulrich

ChangeLog:

	* lib/gdb.exp (gdb_run_cmd): Use -notransfer to make start-up
	messages available to test cases (like chng-sym.exp).

Index: gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.78
diff -u -p -r1.78 gdb.exp
--- gdb/testsuite/lib/gdb.exp	23 Jan 2007 17:11:55 -0000	1.78
+++ gdb/testsuite/lib/gdb.exp	16 Mar 2007 14:33:17 -0000
@@ -283,7 +283,9 @@ proc gdb_run_cmd {args} {
 	    send_gdb "y\n"
 	    exp_continue
 	}
-	-re "Starting program: \[^\r\n\]*" {}
+	# Use -notransfer here so that test cases (like chng-sym.exp)
+	# may test for additional start-up messages.
+	-notransfer -re "Starting program: \[^\r\n\]*" {}
     }
 }
 

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2007-03-16 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-10  0:22 Ulrich Weigand
2007-03-16 15:33 ` Ulrich Weigand [this message]
2007-03-16 15:39   ` [committed] " Daniel Jacobowitz

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=200703161533.l2GFXUQ1006024@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.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