aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-05-24 12:27:39 +0000
committerYao Qi <yao@codesourcery.com>2013-05-24 12:27:39 +0000
commitc0ea94eb34ef5e4c0a4c5df40976d368ddf54fb4 (patch)
tree1baeef58e4975b5a2ab433b5f203038dc93f214f
parent6740dc9c3e1fbc0f2ae2cb54feee654023db157d (diff)
downloadgdb-c0ea94eb34ef5e4c0a4c5df40976d368ddf54fb4.zip
gdb-c0ea94eb34ef5e4c0a4c5df40976d368ddf54fb4.tar.gz
gdb-c0ea94eb34ef5e4c0a4c5df40976d368ddf54fb4.tar.bz2
gdb/
* tracepoint.c (TFILE_PID): Remove. (tfile_open): Don't add thread and inferior. (tfile_close): Don't set 'inferior_ptid'. Don't call exit_inferior_silent. (tfile_thread_alive): Remove. (init_tfile_ops): Don't set field 'to_thread_alive' of tfile_ops. gdb/testsuite/ * gdb.trace/tfile.exp: Test inferior and thread.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.trace/tfile.exp3
-rw-r--r--gdb/tracepoint.c19
4 files changed, 17 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1ee7462..b8ae3ea 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2013-05-24 Yao Qi <yao@codesourcery.com>
+
+ * tracepoint.c (TFILE_PID): Remove.
+ (tfile_open): Don't add thread and inferior.
+ (tfile_close): Don't set 'inferior_ptid'. Don't call
+ exit_inferior_silent.
+ (tfile_thread_alive): Remove.
+ (init_tfile_ops): Don't set field 'to_thread_alive' of
+ tfile_ops.
+
2013-05-23 Doug Evans <dje@google.com>
* contrib/cc-with-tweaks.sh (-p): Handle no dwo files.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index eb7c7a0..cf92f6c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,4 +1,8 @@
2013-05-24 Yao Qi <yao@codesourcery.com>
+
+ * gdb.trace/tfile.exp: Test inferior and thread.
+
+2013-05-24 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
* gdb.base/range-stepping.exp: Skip the rest of tests if the
diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp
index 087d207..d7381eb 100644
--- a/gdb/testsuite/gdb.trace/tfile.exp
+++ b/gdb/testsuite/gdb.trace/tfile.exp
@@ -119,6 +119,9 @@ Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).*
Not looking at any trace frame.*" \
"tstatus on error trace file"
+gdb_test "info threads" "No threads\..*"
+gdb_test "info inferiors" "\\* 1 <null>\[ \t\]+${binfile}.*"
+
# Make sure we can reopen without error.
gdb_test \
"interpreter-exec mi \"-target-select tfile tfile-basic.tf\"" \
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index e2b21af..ba59ab0 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -82,8 +82,6 @@
large. (400 - 31)/2 == 184 */
#define MAX_AGENT_EXPR_LEN 184
-#define TFILE_PID (1)
-
/* A hook used to notify the UI of tracepoint operations. */
void (*deprecated_trace_find_hook) (char *arg, int from_tty);
@@ -4274,10 +4272,6 @@ tfile_open (char *filename, int from_tty)
throw_exception (ex);
}
- inferior_appeared (current_inferior (), TFILE_PID);
- inferior_ptid = pid_to_ptid (TFILE_PID);
- add_thread_silent (inferior_ptid);
-
if (ts->traceframe_count <= 0)
warning (_("No traceframes present in this file."));
@@ -4288,8 +4282,6 @@ tfile_open (char *filename, int from_tty)
merge_uploaded_trace_state_variables (&uploaded_tsvs);
merge_uploaded_tracepoints (&uploaded_tps);
-
- post_create_inferior (&tfile_ops, from_tty);
}
/* Interpret the given line from the definitions part of the trace
@@ -4662,10 +4654,6 @@ tfile_close (void)
if (trace_fd < 0)
return;
- pid = ptid_get_pid (inferior_ptid);
- inferior_ptid = null_ptid; /* Avoid confusion from thread stuff. */
- exit_inferior_silent (pid);
-
close (trace_fd);
trace_fd = -1;
xfree (trace_filename);
@@ -5150,12 +5138,6 @@ tfile_has_registers (struct target_ops *ops)
return traceframe_number != -1;
}
-static int
-tfile_thread_alive (struct target_ops *ops, ptid_t ptid)
-{
- return 1;
-}
-
/* Callback for traceframe_walk_blocks. Builds a traceframe_info
object for the tfile target's current traceframe. */
@@ -5236,7 +5218,6 @@ init_tfile_ops (void)
tfile_ops.to_has_stack = tfile_has_stack;
tfile_ops.to_has_registers = tfile_has_registers;
tfile_ops.to_traceframe_info = tfile_traceframe_info;
- tfile_ops.to_thread_alive = tfile_thread_alive;
tfile_ops.to_magic = OPS_MAGIC;
}