Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/testsuite] more selftest.exp tweaking
@ 2003-01-14 20:29 David Carlton
  2003-01-15 14:22 ` Fernando Nasser
  0 siblings, 1 reply; 3+ messages in thread
From: David Carlton @ 2003-01-14 20:29 UTC (permalink / raw)
  To: gdb-patches; +Cc: Fernando Nasser

I just noticed that my compiler (GCC 3.1 -O2) reorders some of the new
sysroot stuff in captured_main to a location where selftest.exp sees
it.  I'm almost positive that seeing this is legitimate, not a bug in
GDB.

Here's a patch to allow it; OK to commit?  Tested on
i686-pc-linux-gnu/GCC 3.1 -O2/DWARF-2.

(Selftest is a pain.  Sigh.)

David Carlton
carlton@math.stanford.edu

2003-01-14  David Carlton  <carlton@math.stanford.edu>

	* gdb.base/selftest.exp (do_steps_and_nexts): Allow gdb_sysroot.

Index: selftest.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/selftest.exp,v
retrieving revision 1.6
diff -u -p -r1.6 selftest.exp
--- selftest.exp	23 Dec 2002 16:56:25 -0000	1.6
+++ selftest.exp	14 Jan 2003 20:27:08 -0000
@@ -170,6 +170,11 @@ proc do_steps_and_nexts {} {
 		set description "step over current_directory initialization"
 		set command "step"
 	    }
+	    -re ".*gdb_sysroot = .*$gdb_prompt $" {
+		# NOTE: carlton/2003-01-14: More optimization reordering.
+		set description "step over gdb_sysroot initialization"
+		set command "step"
+	    }
 	    -re "\[ \t\]+\{\r\n$gdb_prompt $" {
 		setup_xfail "mips-*-irix5*"
 		fail "$description ended up at odd location"


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

* Re: [rfa/testsuite] more selftest.exp tweaking
  2003-01-14 20:29 [rfa/testsuite] more selftest.exp tweaking David Carlton
@ 2003-01-15 14:22 ` Fernando Nasser
  2003-01-15 17:34   ` David Carlton
  0 siblings, 1 reply; 3+ messages in thread
From: Fernando Nasser @ 2003-01-15 14:22 UTC (permalink / raw)
  To: David Carlton; +Cc: gdb-patches

David, it is approved but please change the comment to state which compiler 
version you've seem this order.

Thanks,
Fernando

P.S.: What I am hoping is that one day in the future we can get rid of some 
cases for very old compilers.  The comments will make it easier.  This is not a 
serious enough condition for adding an 'if' on the compiler version, me thinks...

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:

David Carlton wrote:> I just noticed that my compiler (GCC 3.1 -O2) reorders 
some of the new
> sysroot stuff in captured_main to a location where selftest.exp sees
> it.  I'm almost positive that seeing this is legitimate, not a bug in
> GDB.
> 
> Here's a patch to allow it; OK to commit?  Tested on
> i686-pc-linux-gnu/GCC 3.1 -O2/DWARF-2.
> 
> (Selftest is a pain.  Sigh.)
> 
> David Carlton
> carlton@math.stanford.edu
> 
> 2003-01-14  David Carlton  <carlton@math.stanford.edu>
> 
> 	* gdb.base/selftest.exp (do_steps_and_nexts): Allow gdb_sysroot.
> 
> Index: selftest.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/selftest.exp,v
> retrieving revision 1.6
> diff -u -p -r1.6 selftest.exp
> --- selftest.exp	23 Dec 2002 16:56:25 -0000	1.6
> +++ selftest.exp	14 Jan 2003 20:27:08 -0000
> @@ -170,6 +170,11 @@ proc do_steps_and_nexts {} {
>  		set description "step over current_directory initialization"
>  		set command "step"
>  	    }
> +	    -re ".*gdb_sysroot = .*$gdb_prompt $" {
> +		# NOTE: carlton/2003-01-14: More optimization reordering.
> +		set description "step over gdb_sysroot initialization"
> +		set command "step"
> +	    }
>  	    -re "\[ \t\]+\{\r\n$gdb_prompt $" {
>  		setup_xfail "mips-*-irix5*"
>  		fail "$description ended up at odd location"
> 


@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

* Re: [rfa/testsuite] more selftest.exp tweaking
  2003-01-15 14:22 ` Fernando Nasser
@ 2003-01-15 17:34   ` David Carlton
  0 siblings, 0 replies; 3+ messages in thread
From: David Carlton @ 2003-01-15 17:34 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: gdb-patches

On Wed, 15 Jan 2003 09:21:59 -0500, Fernando Nasser <fnasser@redhat.com> said:

> David, it is approved but please change the comment to state which
> compiler version you've seem this order.

Thanks, will do.

> P.S.: What I am hoping is that one day in the future we can get rid
> of some cases for very old compilers.  The comments will make it
> easier.  This is not a serious enough condition for adding an 'if'
> on the compiler version, me thinks...

No.  Unfortunately, I think that this particular problem will get
worse with future compilers, not better: instruction reordering by
compilers will only increase as optimizers get trickier.

Committed; patch is below.

David Carlton
carlton@math.stanford.edu

2003-01-15  David Carlton  <carlton@math.stanford.edu>

	* gdb.base/selftest.exp (do_steps_and_nexts): Allow gdb_sysroot.

Index: selftest.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/selftest.exp,v
retrieving revision 1.6
diff -u -p -r1.6 selftest.exp
--- selftest.exp	23 Dec 2002 16:56:25 -0000	1.6
+++ selftest.exp	15 Jan 2003 17:32:33 -0000
@@ -170,6 +170,12 @@ proc do_steps_and_nexts {} {
 		set description "step over current_directory initialization"
 		set command "step"
 	    }
+	    -re ".*gdb_sysroot = .*$gdb_prompt $" {
+		# NOTE: carlton/2003-01-15: More optimization reordering,
+		# observed on GCC 3.1.
+		set description "step over gdb_sysroot initialization"
+		set command "step"
+	    }
 	    -re "\[ \t\]+\{\r\n$gdb_prompt $" {
 		setup_xfail "mips-*-irix5*"
 		fail "$description ended up at odd location"


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

end of thread, other threads:[~2003-01-15 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 20:29 [rfa/testsuite] more selftest.exp tweaking David Carlton
2003-01-15 14:22 ` Fernando Nasser
2003-01-15 17:34   ` David Carlton

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