This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] In testsuite, make 'test_compiler_info' work like 'istarget'
- From: Paul Gilliam <pgilliam at us dot ibm dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Daniel Jacobowitz <drow at false dot org>
- Date: Wed, 6 Apr 2005 13:38:34 -0800
- Subject: [commit] In testsuite, make 'test_compiler_info' work like 'istarget'
- References: <200504061408.50092.pgilliam@us.ibm.com> <20050406211452.GA23375@nevyn.them.org>
- Reply-to: pgilliam at us dot ibm dot com
I made one tiny change to fit in with the ohter entries in the ChangeLog.
Here is the patch I committed:
2005-04-06 Paul Gilliam <pgilliam@us.ibm.com>
* lib/gdb.exp (test_compiler_info): Return compiler_info
if no arguments are given.
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.58
diff -c -3 -p -r1.58 gdb.exp
*** lib/gdb.exp 10 Sep 2004 01:04:59 -0000 1.58
--- lib/gdb.exp 6 Apr 2005 20:38:35 -0000
*************** proc get_compiler_info {binfile args} {
*** 1293,1298 ****
--- 1293,1309 ----
proc test_compiler_info { compiler } {
global compiler_info
+
+ # if no arg, return the compiler_info string
+
+ if [string match "" $compiler] {
+ if [info exists compiler_info] {
+ return $compiler_info
+ } else {
+ perror "No compiler info found."
+ }
+ }
+
return [string match $compiler $compiler_info]
}