Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Accept simulator exit message
@ 2002-01-05 22:34 Fred Fish
  2002-01-20 16:11 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Fred Fish @ 2002-01-05 22:34 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnf

Accept the message we get when running the a2-run.exp test
with the simulator.


  2002-01-05  Fred Fish  <fnf@redhat.com>

	* gdb.base/a2-run.exp: When run in the simulator, the exit
	message is slightly different so accept that variation.

Index: gdb.base/a2-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/a2-run.exp,v
retrieving revision 1.3
diff -u -p -r1.3 a2-run.exp
--- a2-run.exp	2001/03/06 08:21:50	1.3
+++ a2-run.exp	2002/01/06 06:30:54
@@ -56,6 +56,7 @@ gdb_load ${binfile}
 
 # Run with no arguments.
 # On VxWorks this justs make sure the program was run.
+# When run in the simulator, we get a slightly different exit message.
 gdb_run_cmd
 
 if [istarget "*-*-vxworks*"] then {
@@ -78,6 +79,9 @@ if [istarget "*-*-vxworks*"] then {
 } else {
     gdb_expect {
 	-re ".*usage:  factorial <number>.*Program exited with code 01.*$gdb_prompt $" {
+	    pass "run \"$testfile\" with no args"
+	}
+	-re ".*usage:  factorial <number>.*Program exited normally.*$gdb_prompt $" {
 	    pass "run \"$testfile\" with no args"
 	}
 	-re ".*$gdb_prompt $" {


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Accept simulator exit message
  2002-01-05 22:34 [RFA] Accept simulator exit message Fred Fish
@ 2002-01-20 16:11 ` Andrew Cagney
  2002-01-20 21:44   ` Michael Snyder
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-01-20 16:11 UTC (permalink / raw)
  To: fnf, Fernando Nasser; +Cc: gdb-patches

Hello,


Did anything come of this patch?

	Andrew

> Accept the message we get when running the a2-run.exp test
> with the simulator.
> 
> 
>   2002-01-05  Fred Fish  <fnf@redhat.com>
> 
> * gdb.base/a2-run.exp: When run in the simulator, the exit
> 	message is slightly different so accept that variation.
> 
> Index: gdb.base/a2-run.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/a2-run.exp,v
> retrieving revision 1.3
> diff -u -p -r1.3 a2-run.exp
> --- a2-run.exp	2001/03/06 08:21:50	1.3
> +++ a2-run.exp	2002/01/06 06:30:54
> @@ -56,6 +56,7 @@ gdb_load ${binfile}
>  
>  # Run with no arguments.
>  # On VxWorks this justs make sure the program was run.
> +# When run in the simulator, we get a slightly different exit message.
>  gdb_run_cmd
>  
>  if [istarget "*-*-vxworks*"] then {
> @@ -78,6 +79,9 @@ if [istarget "*-*-vxworks*"] then {
>  } else {
>      gdb_expect {
>  	-re ".*usage:  factorial <number>.*Program exited with code 01.*$gdb_prompt $" {
> +	    pass "run \"$testfile\" with no args"
> +	}
> +	-re ".*usage:  factorial <number>.*Program exited normally.*$gdb_prompt $" {
>  	    pass "run \"$testfile\" with no args"
>  	}
>  	-re ".*$gdb_prompt $" {
> 
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Accept simulator exit message
  2002-01-20 16:11 ` Andrew Cagney
@ 2002-01-20 21:44   ` Michael Snyder
  2002-01-21  8:16     ` Fernando Nasser
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2002-01-20 21:44 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: fnf, Fernando Nasser, gdb-patches

Andrew Cagney wrote:
> 
> Hello,
> 
> Did anything come of this patch?
> 
>         Andrew

Hang on -- why would it say "program exited normally"?
That would be a bug -- since the program "main" actually
returned one.

I say, conditionalize this change on some Dejagnu variable
that indicates "target cannot return a value from main".

Michael

> 
> > Accept the message we get when running the a2-run.exp test
> > with the simulator.
> >
> >
> >   2002-01-05  Fred Fish  <fnf@redhat.com>
> >
> > * gdb.base/a2-run.exp: When run in the simulator, the exit
> >       message is slightly different so accept that variation.
> >
> > Index: gdb.base/a2-run.exp
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/a2-run.exp,v
> > retrieving revision 1.3
> > diff -u -p -r1.3 a2-run.exp
> > --- a2-run.exp        2001/03/06 08:21:50     1.3
> > +++ a2-run.exp        2002/01/06 06:30:54
> > @@ -56,6 +56,7 @@ gdb_load ${binfile}
> >
> >  # Run with no arguments.
> >  # On VxWorks this justs make sure the program was run.
> > +# When run in the simulator, we get a slightly different exit message.
> >  gdb_run_cmd
> >
> >  if [istarget "*-*-vxworks*"] then {
> > @@ -78,6 +79,9 @@ if [istarget "*-*-vxworks*"] then {
> >  } else {
> >      gdb_expect {
> >       -re ".*usage:  factorial <number>.*Program exited with code 01.*$gdb_prompt $" {
> > +         pass "run \"$testfile\" with no args"
> > +     }
> > +     -re ".*usage:  factorial <number>.*Program exited normally.*$gdb_prompt $" {
> >           pass "run \"$testfile\" with no args"
> >       }
> >       -re ".*$gdb_prompt $" {
> >
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Accept simulator exit message
  2002-01-20 21:44   ` Michael Snyder
@ 2002-01-21  8:16     ` Fernando Nasser
  0 siblings, 0 replies; 4+ messages in thread
From: Fernando Nasser @ 2002-01-21  8:16 UTC (permalink / raw)
  To: Michael Snyder; +Cc: Andrew Cagney, fnf, gdb-patches

Michael Snyder wrote:
> 
> Andrew Cagney wrote:
> >
> > Hello,
> >
> > Did anything come of this patch?
> >
> >         Andrew
> 
> Hang on -- why would it say "program exited normally"?
> That would be a bug -- since the program "main" actually
> returned one.
> 
> I say, conditionalize this change on some Dejagnu variable
> that indicates "target cannot return a value from main".
> 
> Michael
> 

Yes, Fred, please look at the aproved patch from Corinna
(which will probably be checked in soon).

[RFA]: testsuite/gdb.base/a2-bin.exp: Consider `needs_status_wrapper'
target_info

Thanks,
Fernando

> >
> > > Accept the message we get when running the a2-run.exp test
> > > with the simulator.
> > >
> > >
> > >   2002-01-05  Fred Fish  <fnf@redhat.com>
> > >
> > > * gdb.base/a2-run.exp: When run in the simulator, the exit
> > >       message is slightly different so accept that variation.
> > >
> > > Index: gdb.base/a2-run.exp
> > > ===================================================================
> > > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/a2-run.exp,v
> > > retrieving revision 1.3
> > > diff -u -p -r1.3 a2-run.exp
> > > --- a2-run.exp        2001/03/06 08:21:50     1.3
> > > +++ a2-run.exp        2002/01/06 06:30:54
> > > @@ -56,6 +56,7 @@ gdb_load ${binfile}
> > >
> > >  # Run with no arguments.
> > >  # On VxWorks this justs make sure the program was run.
> > > +# When run in the simulator, we get a slightly different exit message.
> > >  gdb_run_cmd
> > >
> > >  if [istarget "*-*-vxworks*"] then {
> > > @@ -78,6 +79,9 @@ if [istarget "*-*-vxworks*"] then {
> > >  } else {
> > >      gdb_expect {
> > >       -re ".*usage:  factorial <number>.*Program exited with code 01.*$gdb_prompt $" {
> > > +         pass "run \"$testfile\" with no args"
> > > +     }
> > > +     -re ".*usage:  factorial <number>.*Program exited normally.*$gdb_prompt $" {
> > >           pass "run \"$testfile\" with no args"
> > >       }
> > >       -re ".*$gdb_prompt $" {
> > >
> > >

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-21 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-05 22:34 [RFA] Accept simulator exit message Fred Fish
2002-01-20 16:11 ` Andrew Cagney
2002-01-20 21:44   ` Michael Snyder
2002-01-21  8:16     ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox