aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-01-30 10:09:11 +0800
committerYao Qi <yao@codesourcery.com>2014-02-05 19:37:25 +0800
commitde7b2893853cd1122b223a2023fdc35b41a26960 (patch)
treec4f54bbe1e43c85d47ed8ee7b2b63287146544fd /gdb/testsuite
parent66d032ac625efa6a68403c4ec318264709a92302 (diff)
downloadgdb-de7b2893853cd1122b223a2023fdc35b41a26960.zip
gdb-de7b2893853cd1122b223a2023fdc35b41a26960.tar.gz
gdb-de7b2893853cd1122b223a2023fdc35b41a26960.tar.bz2
Create inferior for ctf target.
This patch creates inferior when GDB opens a ctf trace data, to be consistent with tfile target. A test case is added to test for live target, tfile and ctf target. gdb: 2014-02-05 Yao Qi <yao@codesourcery.com> * ctf.c: Include "inferior.h" and "gdbthread.h". (CTF_PID): A new macro. (ctf_open): Call inferior_appeared and add_thread_silent. (ctf_close): Call exit_inferior_silent and set inferior_ptid. (ctf_thread_alive): New function. (init_ctf_ops): Install ctf_thread_alive to to_thread_alive. gdb/testsuite: 2014-02-05 Yao Qi <yao@codesourcery.com> * gdb.trace/report.exp (use_collected_data): Test the output of "info threads" and "info inferiors".
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.trace/report.exp7
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 74fc0f7..480732a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2014-02-05 Yao Qi <yao@codesourcery.com>
+ * gdb.trace/report.exp (use_collected_data): Test the output
+ of "info threads" and "info inferiors".
+
+2014-02-05 Yao Qi <yao@codesourcery.com>
+
Revert this patch:
2013-05-24 Yao Qi <yao@codesourcery.com>
diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
index 8bf1251..4d33512 100644
--- a/gdb/testsuite/gdb.trace/report.exp
+++ b/gdb/testsuite/gdb.trace/report.exp
@@ -197,7 +197,7 @@ proc use_collected_data { data_source } {
global tdp1 tdp2 tdp3 tdp4 tdp5 tdp6
global testline1 testline2 testline3 testline4 testline5 testline6
global pcreg fpreg spreg
- global srcfile srcdir subdir
+ global srcfile srcdir subdir binfile
global arg1 arg3
global decimal hex gdb_prompt
#
@@ -397,6 +397,11 @@ proc use_collected_data { data_source } {
}
}
}
+
+ # There is always a thread of an inferior, either a live one or
+ # a faked one.
+ gdb_test "info threads" "\\* ${decimal} (process|Thread) ${decimal}\[ \t\].*"
+ gdb_test "info inferiors" "\\* 1 process ${decimal} \[ \t\]+${binfile}.*"
}
}