Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [patch/rfc;testsuite] Append patchlevel to compiler_info
@ 2004-06-10 19:25 Michael Elizabeth Chastain
  2004-06-10 21:39 ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-10 19:25 UTC (permalink / raw)
  To: cagney, mec.gnu; +Cc: gdb-patches

> like this?

Oh yeah!  Just like that!

Endorsed for self-approval.

Michael C

===

2004-06-10  Andrew Cagney  <cagney@gnu.org>

	* lib/compiler.cc, lib/compiler.c: Append __GNUC_PATCHLEVEL__ to
	the compiler_info.
	* gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-*
	instead of gcc-3-3.


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [patch/rfc;testsuite] Append patchlevel to compiler_info
@ 2004-06-09 20:09 Michael Elizabeth Chastain
  2004-06-10 19:17 ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-09 20:09 UTC (permalink / raw)
  To: cagney, mec.gnu; +Cc: gdb-patches

ac> I was thinking more of changing ``gcc-*-*'' to ``gcc-*''.

Doh!  I didn't think of that.  "gcc-*" is really nice.

ac> It works as is, however I can append "-unknown" - I suspect that's 
ac> better than the ucase "-UNKNOWN".

I would sleep better if it's "-unknown", just because I don't trust
random versions of TCL+Expect+Dejagnu to get the null case right.

Michael C


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [patch/rfc;testsuite] Append patchlevel to compiler_info
@ 2004-06-09 19:24 Michael Elizabeth Chastain
  2004-06-09 19:34 ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-09 19:24 UTC (permalink / raw)
  To: cagney, gdb-patches, mec.gnu

This is good.  I think it needs a comment that gcc supports
__GNUC_PATCHLEVEL__ starting with gcc 3.0, so that we know how long
we need to keep the conditional logic.

Can you do a before-and-after test with gcc 2.95.3 and with some
version of gcc 3.X ?  I expect that all the "gcc-2-*" and "gcc-*-*"
will continue to work but that really needs testing.  They can be
improved to "gcc-2-*-*" and "gcc-*-*-*" later.

Hmmm, come to think of it, I don't know if "gcc-*-*-*" will match
"gcc-2-95-".  How about if you make the unknown case "gcc-X-Y-UNKNOWN"
instead of "gcc-X-Y-".

Michael C

2004-06-09  Andrew Cagney  <cagney@gnu.org>

	* lib/compiler.cc, lib/compiler.c: Append __GNUC_PATCHLEVEL__ to
	the compiler_info.
	* gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-*
	instead of gcc-3-3.


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [patch/rfc;testsuite] Append patchlevel to compiler_info
@ 2004-06-09 17:46 Andrew Cagney
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2004-06-09 17:46 UTC (permalink / raw)
  To: gdb-patches, Michael Elizabeth Chastain

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

Hello,

The attached patch changes the testsuite compiler_info for gcc from:

  gcc-MAJOR-MINOR e.g., gcc-3-3

to either of:

  gcc-MAJOR-MINOR-PATCHLEVEL e.g., gcc-3-3-2
  gcc-MAJOR-MINOR- e.g., gcc-2-95-

dependant on that info being available via __GNUC_PATCHLEVEL__.  For the 
latter, possible alternatives include:

  gcc-MAJOR-MINOR-__GNUC_PATCHLEVEL__ e.g., gcc-2-95-__GNUC_PATCHLEVEL__
  gcc-MAJOR-MINOR e.g., gcc-2-95

Thoughts?  Michael?  The original motivation for the change is gone but 
seeing as it is sitting in my sandpit.

Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3041 bytes --]

2004-06-09  Andrew Cagney  <cagney@gnu.org>

	* lib/compiler.cc, lib/compiler.c: Append __GNUC_PATCHLEVEL__ to
	the compiler_info.
	* gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-*
	instead of gcc-3-3.

Index: gdb.base/structs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v
retrieving revision 1.20
diff -p -u -r1.20 structs.exp
--- gdb.base/structs.exp	9 Jun 2004 17:27:57 -0000	1.20
+++ gdb.base/structs.exp	9 Jun 2004 17:39:08 -0000
@@ -218,8 +218,8 @@ proc test_struct_calls { n } {
     set tests "call $n ${testfile}"
 
     # Call fun${n}, checking the printed return-value.
-    setup_compiler_kfails structs-tc-tll gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
-    setup_compiler_kfails structs-tc-td gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
     gdb_test "p/c fun${n}()"  "[foo ${n}]" "p/c fun<n>(); ${tests}"
 
     # Check that GDB can always pass a structure to an inferior function.
@@ -230,8 +230,8 @@ proc test_struct_calls { n } {
     # examining that global to confirm that the value is as expected.
 
     gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
-    setup_compiler_kfails structs-tc-tll gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
-    setup_compiler_kfails structs-tc-td gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
     gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
 }
 
Index: lib/compiler.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.c,v
retrieving revision 1.3
diff -p -u -r1.3 compiler.c
--- lib/compiler.c	24 Jan 2004 21:59:03 -0000	1.3
+++ lib/compiler.c	9 Jun 2004 17:39:08 -0000
@@ -37,7 +37,11 @@
 set compiler_info ""
 
 #if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+#if defined (__GNUC_PATCHLEVEL__)
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
+#else
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ ""} -]
+#endif
 set gcc_compiled __GNUC__
 #else
 set gcc_compiled 0
Index: lib/compiler.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.cc,v
retrieving revision 1.5
diff -p -u -r1.5 compiler.cc
--- lib/compiler.cc	24 Jan 2004 21:59:03 -0000	1.5
+++ lib/compiler.cc	9 Jun 2004 17:39:08 -0000
@@ -25,7 +25,11 @@
 set compiler_info ""
 
 #if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+#if defined (__GNUC_PATCHLEVEL__)
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
+#else
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ ""} -]
+#endif
 set gcc_compiled __GNUC__
 #else
 set gcc_compiled 0

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

end of thread, other threads:[~2004-06-10 21:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-10 19:25 [patch/rfc;testsuite] Append patchlevel to compiler_info Michael Elizabeth Chastain
2004-06-10 21:39 ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2004-06-09 20:09 Michael Elizabeth Chastain
2004-06-10 19:17 ` Andrew Cagney
2004-06-09 19:24 Michael Elizabeth Chastain
2004-06-09 19:34 ` Andrew Cagney
2004-06-09 17:46 Andrew Cagney

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