aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/step-symless.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-10-06 21:10:33 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-10-06 21:10:33 +0000
commit2e24f4aab7c23f3881a8fec9cb8192aae87caf0a (patch)
tree74b562e7fc4ca28a1f855ac2c55192ecba7b6de3 /gdb/testsuite/gdb.base/step-symless.c
parent39dc86500ae1acf0b01897624999f5cb8dbca1fb (diff)
downloadgdb-2e24f4aab7c23f3881a8fec9cb8192aae87caf0a.zip
gdb-2e24f4aab7c23f3881a8fec9cb8192aae87caf0a.tar.gz
gdb-2e24f4aab7c23f3881a8fec9cb8192aae87caf0a.tar.bz2
gdb/
Fix crash during stepping on ppc32. * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL SYM. gdb/testsuite/ Fix crash during stepping on ppc32. * gdb.base/step-symless.c: New file. * gdb.base/step-symless.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/step-symless.c')
-rw-r--r--gdb/testsuite/gdb.base/step-symless.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/step-symless.c b/gdb/testsuite/gdb.base/step-symless.c
new file mode 100644
index 0000000..97eaf5e
--- /dev/null
+++ b/gdb/testsuite/gdb.base/step-symless.c
@@ -0,0 +1,38 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2012 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/>. */
+
+static volatile int v;
+
+static void
+symful (void)
+{
+ v++;
+}
+
+static void
+symless (void)
+{
+ v++;
+}
+
+int
+main (void)
+{
+ symless ();
+ symful ();
+ return 0;
+}