aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracefile.h
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-02-10 15:22:55 +0800
committerYao Qi <yao@codesourcery.com>2014-02-23 11:44:26 +0800
commit12e03cd06ada8ca7e62fa52aa84946256c1bc654 (patch)
treeca9fbe72a206a1312185655f2e706914938cef7e /gdb/tracefile.h
parent11395323794268a9945dd31eb46905e975d87b3d (diff)
downloadgdb-12e03cd06ada8ca7e62fa52aa84946256c1bc654.zip
gdb-12e03cd06ada8ca7e62fa52aa84946256c1bc654.tar.gz
gdb-12e03cd06ada8ca7e62fa52aa84946256c1bc654.tar.bz2
Share some code between ctf and tfile target.
This patch move the duplicated code between tfile and ctf targets into file tracefile.c. The common part of target_ops fields are set in init_tracefile_ops. gdb: 2014-02-23 Yao Qi <yao@codesourcery.com> * ctf.c (ctf_has_stack, ctf_has_registers): Remove. (ctf_thread_alive, ctf_get_trace_status): Remove. (init_ctf_ops): Don't set some fields of ctf_ops. Call init_tracefile_ops. * tracefile-tfile.c (tfile_get_trace_status): Remove. (tfile_has_stack, tfile_has_registers): Remove. (tfile_thread_alive): Remove. (init_tfile_ops): Don't set some fields of tfile_ops. Call init_tracefile_ops. * tracefile.c (tracefile_has_stack): New function. (tracefile_has_registers): New function. (tracefile_thread_alive): New function. (tracefile_get_trace_status): New function. (init_tracefile_ops): New function. * tracefile.h (init_tracefile_ops): Declare.
Diffstat (limited to 'gdb/tracefile.h')
-rw-r--r--gdb/tracefile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/tracefile.h b/gdb/tracefile.h
index 833de5c..db454e3 100644
--- a/gdb/tracefile.h
+++ b/gdb/tracefile.h
@@ -111,4 +111,6 @@ struct trace_file_writer
extern struct trace_file_writer *tfile_trace_file_writer_new (void);
+extern void init_tracefile_ops (struct target_ops *ops);
+
#endif /* TRACEFILE_H */