From: Andrew Cagney <cagney@gnu.org>
To: Michael Elizabeth Chastain <mec.gnu@mindspring.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc;testsuite] Append patchlevel to compiler_info
Date: Thu, 10 Jun 2004 19:17:00 -0000 [thread overview]
Message-ID: <40C8B3BC.9080104@gnu.org> (raw)
In-Reply-To: <20040609200939.404254B104@berman.michael-chastain.com>
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
> 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
like this?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3200 bytes --]
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.
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 10 Jun 2004 19:16:05 -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 10 Jun 2004 19:16:05 -0000
@@ -37,7 +37,12 @@
set compiler_info ""
#if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+#if defined (__GNUC_PATCHLEVEL__)
+/* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro. */
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
+#else
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -]
+#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 10 Jun 2004 19:16:05 -0000
@@ -25,7 +25,12 @@
set compiler_info ""
#if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+#if defined (__GNUC_PATCHLEVEL__)
+/* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro. */
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
+#else
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -]
+#endif
set gcc_compiled __GNUC__
#else
set gcc_compiled 0
next prev parent reply other threads:[~2004-06-10 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-09 20:09 Michael Elizabeth Chastain
2004-06-10 19:17 ` Andrew Cagney [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-06-10 19:25 Michael Elizabeth Chastain
2004-06-10 21:39 ` Andrew Cagney
2004-06-09 19:24 Michael Elizabeth Chastain
2004-06-09 19:34 ` Andrew Cagney
2004-06-09 17:46 Andrew Cagney
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=40C8B3BC.9080104@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=mec.gnu@mindspring.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