aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorMarkus Metzger <mmetzger@sourceware.org>2013-03-11 08:47:10 +0000
committerMarkus Metzger <mmetzger@sourceware.org>2013-03-11 08:47:10 +0000
commit7c1687a9661c460fac39e57a451a90c5f48213d9 (patch)
tree35ee2e97db0ea8485c239d209c625aa80eaad35e /gdb/target.c
parent25ea693b87da84e449d731c609b0fd744092e70d (diff)
downloadgdb-7c1687a9661c460fac39e57a451a90c5f48213d9.zip
gdb-7c1687a9661c460fac39e57a451a90c5f48213d9.tar.gz
gdb-7c1687a9661c460fac39e57a451a90c5f48213d9.tar.bz2
Provide default target methods for record targets that are likely to be shared
between different record targets. gdb/ * record.h (record_disconnect): New. (record_detach): New. (record_mourn_inferior): New. (record_kill): New. * record-full.c (record_disconnect, record_detach, record_mourn_inferior, record_kill): Move to... * record.c: ...here. (DEBUG): New. (record_stop): New. (record_unpush): New. (cmd_record_stop): Call record_stop. Replace unpush_target call with record_unpush call. (record_disconnect, record_detach): Assert that the target is of record stratum. Call record_unpush, record_stop, and DEBUG. (record_mourn_inferior, record_kill): Assert that the target is of record stratum. Call record_unpush and DEBUG.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index efd5f63..e41f074 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -4244,6 +4244,23 @@ target_read_btrace (struct btrace_target_info *btinfo,
/* See target.h. */
void
+target_stop_recording (void)
+{
+ struct target_ops *t;
+
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+ if (t->to_stop_recording != NULL)
+ {
+ t->to_stop_recording ();
+ return;
+ }
+
+ /* This is optional. */
+}
+
+/* See target.h. */
+
+void
target_info_record (void)
{
struct target_ops *t;