aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPaul Gilliam <pgilliam@us.ibm.com>2005-04-06 21:38:48 +0000
committerPaul Gilliam <pgilliam@us.ibm.com>2005-04-06 21:38:48 +0000
commit6e87504dd4cce97b2c00ac0cd6b41e8ebb95fc44 (patch)
tree0dad64cb03e6c2294dbb428bc4e71fef5dd9b8f8 /gdb
parent21b4b2f28c3a4de55517693f3ce799cad8b42195 (diff)
downloadgdb-6e87504dd4cce97b2c00ac0cd6b41e8ebb95fc44.zip
gdb-6e87504dd4cce97b2c00ac0cd6b41e8ebb95fc44.tar.gz
gdb-6e87504dd4cce97b2c00ac0cd6b41e8ebb95fc44.tar.bz2
test_compiler_info: Return compiler_info if no arguments are given.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp11
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 769f54f..0e4f39c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9100118..5bef869 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -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]
}