From 6e87504dd4cce97b2c00ac0cd6b41e8ebb95fc44 Mon Sep 17 00:00:00 2001 From: Paul Gilliam Date: Wed, 6 Apr 2005 21:38:48 +0000 Subject: [PATCH] test_compiler_info: Return compiler_info if no arguments are given. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/gdb.exp | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 769f54f78e3..0e4f39c7c9f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-04-06 Paul Gilliam + + * lib/gdb.exp (test_compiler_info): Return compiler_info + if no arguments are given. + 2005-04-01 Paul Gilliam * 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 91001185623..5bef869733b 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] } -- 2.30.2