This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH obv] Fix non stopping breakpoint on newer compilers.
- From: Walfred Tedeschi <walfred dot tedeschi at intel dot com>
- To: palves at redhat dot com, brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org, Walfred Tedeschi <walfred dot tedeschi at intel dot com>
- Date: Mon, 26 Oct 2015 13:54:42 +0100
- Subject: [PATCH obv] Fix non stopping breakpoint on newer compilers.
- Authentication-results: sourceware.org; auth=none
- References: <1445864086-4831-1-git-send-email-walfred dot tedeschi at intel dot com>
The breakpoint presented in the return statement was not activated while
compiling the test with gcc 4.9.2. Added a dummy statement to allow the
breakpoint again.
2015-10-14 Walfred Tedeschi <walfred.tedeschi@intel.com>
gdb/testsuite:
* i386-mpx-map.c (foo): Add dummy statement to trigger breakpoint.
---
gdb/testsuite/gdb.arch/i386-mpx-map.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-map.c b/gdb/testsuite/gdb.arch/i386-mpx-map.c
index 8a9094c..ee7f11b 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-map.c
+++ b/gdb/testsuite/gdb.arch/i386-mpx-map.c
@@ -70,8 +70,9 @@ foo (T *p)
#if defined __GNUC__ && !defined __INTEL_COMPILER
__bnd_store_ptr_bounds (x, &x);
#endif
-
- return; /* after-assign */
+ /* Dummy assign. */
+ x = x + 1; /* after-assign */
+ return;
}
int
--
2.1.4