public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp
@ 2016-02-18 10:59 Yao Qi
  2016-02-18 11:25 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-02-18 10:59 UTC (permalink / raw)
  To: gdb-patches

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.
---
 .../gdb.threads/forking-threads-plus-breakpoint.exp       | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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"
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp
  2016-02-18 10:59 [PATCH] Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp Yao Qi
@ 2016-02-18 11:25 ` Pedro Alves
  2016-02-18 12:05   ` Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2016-02-18 11:25 UTC (permalink / raw)
  To: Yao Qi, gdb-patches

On 02/18/2016 10:59 AM, Yao Qi wrote:
> 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.

Whoops, indeed.

> 
> 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.

Thanks, LGTM.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp
  2016-02-18 11:25 ` Pedro Alves
@ 2016-02-18 12:05   ` Yao Qi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2016-02-18 12:05 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Yao Qi, gdb-patches

Pedro Alves <palves@redhat.com> writes:

> Thanks, LGTM.

Patch is pushed in.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-18 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 10:59 [PATCH] Set breakpoint condition-evaluation in forking-threads-plus-breakpoint.exp Yao Qi
2016-02-18 11:25 ` Pedro Alves
2016-02-18 12:05   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).