aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c
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-main.c
parenta391a2f6df2553b9d2e0cf4bc8c58e85d73137ae (diff)
downloadbinutils-b99b5f66e1d6f80624e8a28b8ebbf9235d50041e.zip
binutils-b99b5f66e1d6f80624e8a28b8ebbf9235d50041e.tar.gz
binutils-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-main.c')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c b/gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c
new file mode 100644
index 0000000..ad3e42a
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error-main.c
@@ -0,0 +1,37 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ 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/>. */
+
+asm (".globl f_start");
+asm ("f_start:");
+
+volatile int v;
+
+void
+f (int x)
+{
+ v++;
+}
+
+asm (".globl f_end");
+asm ("f_end:");
+
+int
+main (void)
+{
+ f (1);
+ return 0;
+}