test_compiler_info: Return compiler_info if no arguments are given.
authorPaul Gilliam <pgilliam@us.ibm.com>
Wed, 6 Apr 2005 21:38:48 +0000 (21:38 +0000)
committerPaul Gilliam <pgilliam@us.ibm.com>
Wed, 6 Apr 2005 21:38:48 +0000 (21:38 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index 769f54f78e3a37eb83923b06af7256fd0ffc67ab..0e4f39c7c9fe5c5266e53193d74d9f5a35cdeae1 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-06  Paul Gilliam  <pgilliam@us.ibm.com>
+
+        * lib/gdb.exp (test_compiler_info): Return compiler_info
+        if no arguments are given.
+
 2005-04-01  Paul Gilliam  <pgilliam@us.ibm.com>
 
        * gdb.arch/altivec-abi.exp: Check for compiler and set
index 910011856230774f03fbf91dff27529cf7398a1b..5bef869733b54c8cc2c92920fd1120ded9381e5a 100644 (file)
@@ -1293,6 +1293,17 @@ proc get_compiler_info {binfile args} {
 
 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]
 }