From a283690eb7320dfe4074301c673f6cc3dd21fb11 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 10 Feb 2014 15:28:33 +0800 Subject: 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 * 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'. --- gdb/tracefile-tfile.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'gdb/tracefile-tfile.c') diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c index 2daa560..3ef109e 100644 --- a/gdb/tracefile-tfile.c +++ b/gdb/tracefile-tfile.c @@ -1012,18 +1012,6 @@ tfile_get_trace_state_variable_value (struct target_ops *self, return found; } -static int -tfile_has_all_memory (struct target_ops *ops) -{ - return 1; -} - -static int -tfile_has_memory (struct target_ops *ops) -{ - return 1; -} - /* Callback for traceframe_walk_blocks. Builds a traceframe_info object for the tfile target's current traceframe. */ @@ -1105,8 +1093,6 @@ init_tfile_ops (void) tfile_ops.to_trace_find = tfile_trace_find; tfile_ops.to_get_trace_state_variable_value = tfile_get_trace_state_variable_value; - tfile_ops.to_has_all_memory = tfile_has_all_memory; - tfile_ops.to_has_memory = tfile_has_memory; tfile_ops.to_traceframe_info = tfile_traceframe_info; } -- cgit v1.1