This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=40fb20d037581bc9d4b17b6ab64ee98825cfacab

commit 40fb20d037581bc9d4b17b6ab64ee98825cfacab
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Feb 18 12:04:32 2016 +0000

    Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp
    
    Proc do_test in forking-threads-plus-breakpoint.exp has an argument
    cond_bp_target, but the test doesn't use it to set
    "breakpoint condition-evaluation", which is an oversight in the test.
    
    This patch fixes it by setting "breakpoint condition-evaluation" per
    $cond_bp_target.
    
    gdb/testsuite:
    
    2016-02-18  Yao Qi  <yao.qi@linaro.org>
    
    	* gdb.threads/forking-threads-plus-breakpoint.exp (do_test):
    	Set "set breakpoint condition-evaluation" per $cond_bp_target.

Diff:
---
 gdb/testsuite/ChangeLog                                   |  5 +++++
 .../gdb.threads/forking-threads-plus-breakpoint.exp       | 15 +++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 462ba70..1851c30 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-18  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.threads/forking-threads-plus-breakpoint.exp (do_test):
+	Set "set breakpoint condition-evaluation" per $cond_bp_target.
+
 2016-02-16  Doug Evans  <dje@google.com>
 
 	* gdb.base/skip.c: Add copyright.  Whitespace cleanup.
diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
index ff3ca9a..3d8b308 100644
--- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
+++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
@@ -83,6 +83,21 @@ proc do_test { cond_bp_target detach_on_fork displaced } {
 	return 0
     }
 
+    if {$cond_bp_target} {
+	set test "set breakpoint condition-evaluation target"
+	gdb_test_multiple $test $test {
+	    -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
+		# Target doesn't support breakpoint condition
+		# evaluation on its side.  Skip the test.
+		return 0
+	    }
+	    -re "^$test\r\n$gdb_prompt $" {
+	    }
+	}
+    } else {
+	gdb_test_no_output "set breakpoint condition-evaluation host"
+    }
+
     gdb_test_no_output "set detach-on-fork $detach_on_fork"
     gdb_test_no_output "set displaced $displaced"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]