Index: gdb/testsuite/gdb.base/comprdebug.exp |
diff --git a/gdb/testsuite/gdb.java/jv-exp.exp b/gdb/testsuite/gdb.base/comprdebug.exp |
similarity index 53% |
copy from gdb/testsuite/gdb.java/jv-exp.exp |
copy to gdb/testsuite/gdb.base/comprdebug.exp |
index bea701b489cc2641578c7ff5ce8dc667458e4110..aea8b8a2eadb811981c11b43cf1e40d8cd6f933c 100644 |
--- a/gdb/testsuite/gdb.java/jv-exp.exp |
+++ b/gdb/testsuite/gdb.base/comprdebug.exp |
@@ -1,4 +1,4 @@ |
-# Copyright 2000, 2007-2012 Free Software Foundation, Inc. |
+# Copyright 2012-2013 Free Software Foundation, Inc. |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -13,29 +13,34 @@ |
# You should have received a copy of the GNU General Public License |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
-load_lib "java.exp" |
+standard_testfile average.c |
-proc test_comparisons {} { |
- global gdb_prompt |
+set ofile "${binfile}0.o" |
+if {[gdb_compile $srcdir/$subdir/$srcfile $ofile \ |
+ object {debug}] != ""} { |
+ untested comprdebug.exp |
+ return |
+} |
- # Test various comparisons. |
+set objcopy_program [gdb_find_objcopy] |
+set cmd "$objcopy_program --compress-debug-sections $ofile" |
+verbose "invoking $cmd" |
+set result [catch "exec $cmd" output] |
+verbose "result is $result" |
+verbose "output is $output" |
- gdb_test "p 1 > 2" " = false" |
- gdb_test "p 1 < 2" " = true" |
+if {$result == 1} { |
+ untested comprdebug.exp |
+ return |
} |
-# Start with a fresh gdb. |
- |
gdb_exit |
gdb_start |
gdb_reinitialize_dir $srcdir/$subdir |
- |
-gdb_test "set print sevenbit-strings" "" |
-gdb_test "set print address off" "" "" |
-gdb_test "set width 0" "" |
- |
-if [set_lang_java] then { |
- test_comparisons |
+set testname "file [file tail $ofile]" |
+if {[gdb_file_cmd $ofile] == 0} { |
+ pass $testname |
} else { |
- warning "Java expression tests suppressed" |
+ fail $testname |
} |
+ |