aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracefile.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-02-10 15:28:33 +0800
committerYao Qi <yao@codesourcery.com>2014-02-23 11:44:27 +0800
commita283690eb7320dfe4074301c673f6cc3dd21fb11 (patch)
tree16bd91d05566c2949d9d1c3f758296a7ff17af08 /gdb/tracefile.c
parent12e03cd06ada8ca7e62fa52aa84946256c1bc654 (diff)
downloadfsf-binutils-gdb-a283690eb7320dfe4074301c673f6cc3dd21fb11.zip
fsf-binutils-gdb-a283690eb7320dfe4074301c673f6cc3dd21fb11.tar.gz
fsf-binutils-gdb-a283690eb7320dfe4074301c673f6cc3dd21fb11.tar.bz2
Let tracefile has_memory and has_all_memory.
At present, tfile target thinks it has memory but ctf doesn't. This is an oversight when I added ctf target support. This patch moves the implementations of to_has_all_memory and to_has_memory to upper layer. After this change, both tfile and ctf target think they have memory. gdb: 2014-02-23 Yao Qi <yao@codesourcery.com> * tracefile-tfile.c (tfile_has_all_memory): Remove. (tfile_has_memory): Remove. (init_tfile_ops): Don't set fields to_has_all_memory and to_has_memory of tfile_ops. * tracefile.c (tracefile_has_all_memory): New function. (tracefile_has_memory): New function. (init_tracefile_ops): Initialize fields to_has_all_memory and to_has_memory of 'ops'.
Diffstat (limited to 'gdb/tracefile.c')
-rw-r--r--gdb/tracefile.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/tracefile.c b/gdb/tracefile.c
index 7972290..508f898 100644
--- a/gdb/tracefile.c
+++ b/gdb/tracefile.c
@@ -376,6 +376,22 @@ trace_save_ctf (const char *dirname, int target_does_save)
do_cleanups (back_to);
}
+/* This is the implementation of target_ops method to_has_all_memory. */
+
+static int
+tracefile_has_all_memory (struct target_ops *ops)
+{
+ return 1;
+}
+
+/* This is the implementation of target_ops method to_has_memory. */
+
+static int
+tracefile_has_memory (struct target_ops *ops)
+{
+ return 1;
+}
+
/* This is the implementation of target_ops method to_has_stack.
The target has a stack when GDB has already selected one trace
frame. */
@@ -424,6 +440,8 @@ init_tracefile_ops (struct target_ops *ops)
{
ops->to_stratum = process_stratum;
ops->to_get_trace_status = tracefile_get_trace_status;
+ ops->to_has_all_memory = tracefile_has_all_memory;
+ ops->to_has_memory = tracefile_has_memory;
ops->to_has_stack = tracefile_has_stack;
ops->to_has_registers = tracefile_has_registers;
ops->to_thread_alive = tracefile_thread_alive;