This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 5/6] Test tracepoints are installed or not
Test the state of field 'installed'. This patch should be applied on
top of this one,
[PATCH] Test on =breakpoint-created when reconnect
http://sourceware.org/ml/gdb-patches/2012-12/msg00019.html
gdb/testsuite:
2012-12-03 Yao Qi <yao@codesourcery.com>
* gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check
'installed' field in '=breakpoint-modified'.
(test_reconnect): Check 'installed' field in
'=breakpoint-modified' and '=breakpoint-created'.
---
gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
index a4cef0a..f20ea74 100644
--- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
@@ -130,10 +130,20 @@ proc test_reconnect { } { with_test_prefix "reconnect" {
fail "$test: 2"
exp_continue
}
- -re ".*=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*${mi_gdb_prompt}" {
+ -re ".*=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*installed=\"y\"" {
# Tracepoint on main is created because it is not defined
# before and it is from remote stub.
pass $test
+ exp_continue
+ }
+ -re ".*=breakpoint-modified,bkpt=\{number=\"2\".*,func=\"marker\".*installed=\"y\"" {
+ # Tracepoint on marker is defined. After the sync, we
+ # know that the tracepoint is in remote stub. Mark it
+ # 'installed'.
+ pass "tracepoint on marker is installed"
+ exp_continue
+ }
+ -re ".*${mi_gdb_prompt}" {
}
timeout {
fail $test
@@ -187,8 +197,12 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
set test "tracepoint on pendfunc2 resolved"
gdb_expect {
- -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\"" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"n\"" {
pass "$test"
+ exp_continue
+ }
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"y\"" {
+ pass "tracepoint on pendfunc2 installed"
}
-re ".*${mi_gdb_prompt}$" {
fail $test
@@ -210,7 +224,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
mi_send_resuming_command "exec-continue" "continuing to exit"
set test "tracepoint on pendfunc2 becomes pending again"
gdb_expect {
- -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"<PENDING>\",.*times=\"0\"" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"<PENDING>\",.*times=\"0\".*installed=\"n\"" {
pass "$test"
}
-re ".*${mi_gdb_prompt}$" {
--
1.7.7.6