aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c
diff options
context:
space:
mode:
authorAntoine Tremblay <antoine.tremblay@ericsson.com>2015-06-12 07:58:47 -0400
committerAntoine Tremblay <antoine.tremblay@ericsson.com>2015-06-12 08:43:17 -0400
commit98aa42ee02c56378cecb737d01c27adca36bf48f (patch)
tree20394df6558afc1babf8611f64b79939e935a017 /gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c
parent0054dcd7b6a815ce178c464f7a1b7e7fce7df3e4 (diff)
downloadgdb-98aa42ee02c56378cecb737d01c27adca36bf48f.zip
gdb-98aa42ee02c56378cecb737d01c27adca36bf48f.tar.gz
gdb-98aa42ee02c56378cecb737d01c27adca36bf48f.tar.bz2
Fix MI dprintf-insert not printing on a resolved pending location.
This patch fixes the "Format string required" error when trying to print a dprintf on a now resolved, pending location when set via the MI interface even if the format string is entered correctly. This patch also adds a test case to check that issue called mi-dprintf-pending.exp. gdb/ChangeLog: PR breakpoints/16465 * breakpoint.c (create_breakpoint): Save extra_string for pending breakpoints. gdb/testsuite/ChangeLog: PR breakpoints/16465 * gdb.mi/mi-dprintf-pending.c: New file. * gdb.mi/mi-dprintf-pending.exp: New test. * gdb.mi/mi-dprintf-pendshr.c: New file.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c')
-rw-r--r--gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c b/gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c
new file mode 100644
index 0000000..05d188c
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-dprintf-pendshr.c
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 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/>. */
+
+void
+pendfunc1 (void)
+{
+}
+
+void
+pendfunc (void)
+{
+ pendfunc1 ();
+}