Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] testsuite: Fix rerun_to_main to allow restarting
Date: Wed, 18 Sep 2002 07:56:00 -0000	[thread overview]
Message-ID: <3D8893C9.5050209@redhat.com> (raw)
In-Reply-To: <20020918111255.Y29920@cygbert.vinschen.de>

It is not obvious at all, but I think it is correct.

Please check it in.

P.S.: I was thinking if the same message could come out of some 
erroneous condition (in which case we would be failing to detect some 
problem). In any case, we will have to accept it we we want to support a 
  generic restart and we will have detected a malfunction that causes a 
message like that much before anyway.

Corinna Vinschen wrote:
> Hi,
> 
> On Sat, Sep 14, 2002 at 11:51:39AM +0200, Corinna Vinschen wrote:
> 
>>the following patch fixes an error in the testsuite lib.  In lib/gdb.exp,
>>the proc rerun_to_main() doesn't take into account, that some targets
>>never actually exit, but instead are programatically trapped in some
>>_exit function.
>>[...]
> 
> 
> may I treat this as obvious patch?  I'm not sure if that still counts
> as one...
> 
> Corinna
> 
> 
>>	* lib/gdb.exp (rerun_to_main): Allow restarting application.
>>	* gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate.
>>
>>Index: lib/gdb.exp
>>===================================================================
>>RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
>>retrieving revision 1.26
>>diff -u -p -r1.26 gdb.exp
>>--- lib/gdb.exp	13 Sep 2002 17:20:11 -0000	1.26
>>+++ lib/gdb.exp	14 Sep 2002 09:44:44 -0000
>>@@ -1685,6 +1685,10 @@ proc rerun_to_main {} {
>>   } else {
>>     send_gdb "run\n"
>>     gdb_expect {
>>+      -re "The program .* has been started already.*y or n. $" {
>>+	  send_gdb "y\n"
>>+	  exp_continue
>>+      }
>>       -re "Starting program.*$gdb_prompt $"\
>> 	      {pass "rerun to main" ; return 0}
>>       -re "$gdb_prompt $"\
>>Index: gdb.base/ena-dis-br.exp
>>===================================================================
>>RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ena-dis-br.exp,v
>>retrieving revision 1.2
>>diff -u -p -r1.2 ena-dis-br.exp
>>--- gdb.base/ena-dis-br.exp	6 Mar 2001 08:21:50 -0000	1.2
>>+++ gdb.base/ena-dis-br.exp	14 Sep 2002 09:44:44 -0000
>>@@ -38,30 +38,6 @@ if  { [gdb_compile "${srcdir}/${subdir}/
>>      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
>> }
>> 
>>-proc rerun_to_main {} {
>>-  global gdb_prompt
>>-
>>-  if [target_info exists use_gdb_stub] {
>>-    gdb_run_cmd
>>-    gdb_expect {
>>-      -re ".*Breakpoint .*main .*$gdb_prompt $"\
>>-	      {pass "rerun to main" ; return 0}
>>-      -re "$gdb_prompt $"\
>>-	      {fail "rerun to main" ; return 0}
>>-      timeout {fail "(timeout) rerun to main" ; return 0}
>>-    }
>>-  } else {
>>-    send_gdb "run\n"
>>-    gdb_expect {
>>-      -re "Starting program.*$gdb_prompt $"\
>>-	      {pass "rerun to main" ; return 0}
>>-      -re "$gdb_prompt $"\
>>-	      {fail "rerun to main" ; return 0}
>>-      timeout {fail "(timeout) rerun to main" ; return 0}
>>-    }
>>-  }
>>-}
>>-
>> gdb_exit
>> gdb_start
>> gdb_reinitialize_dir $srcdir/$subdir
> 
> 


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


  reply	other threads:[~2002-09-18 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-14  2:51 Corinna Vinschen
2002-09-18  2:13 ` Corinna Vinschen
2002-09-18  7:56   ` Fernando Nasser [this message]
2002-09-18  8:34     ` Corinna Vinschen

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=3D8893C9.5050209@redhat.com \
    --to=fnasser@redhat.com \
    --cc=gdb-patches@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