aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-09-08 15:24:25 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-09-08 15:24:25 +0000
commitb99b5f66e1d6f80624e8a28b8ebbf9235d50041e (patch)
treef07aff7b099135e1608734978e2097e8c5277fc8 /gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
parenta391a2f6df2553b9d2e0cf4bc8c58e85d73137ae (diff)
downloadgdb-b99b5f66e1d6f80624e8a28b8ebbf9235d50041e.zip
gdb-b99b5f66e1d6f80624e8a28b8ebbf9235d50041e.tar.gz
gdb-b99b5f66e1d6f80624e8a28b8ebbf9235d50041e.tar.bz2
gdb/
* stack.c (print_frame_args): New variable except. Wrap read_var_value and common_val_print into TRY_CATCH. gdb/testsuite/ * gdb.dwarf2/dw2-param-error-main.c: New file. * gdb.dwarf2/dw2-param-error.S: New file. * gdb.dwarf2/dw2-param-error.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-param-error.exp')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-param-error.exp33
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
new file mode 100644
index 0000000..791799c
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -0,0 +1,33 @@
+# Copyright 2011 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# 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 dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+ return 0
+}
+
+set testfile dw2-param-error
+if { [prepare_for_testing ${testfile}.exp "${testfile}" "${testfile}-main.c ${testfile}.S" {nodebug}] } {
+ return -1
+}
+
+if ![runto f] {
+ return -1
+}
+
+# FAIL was printing:
+# [...] in f (bad=)
+gdb_test "frame" { f \(bad=<error reading variable: Asked for position 0 of stack, stack only has 0 elements on it\.>, good=23\)}