diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-17 21:47:15 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:46:50 -0700 |
commit | 1c63c99491f9581d3f76d116cedcbfa5f124ca5a (patch) | |
tree | f479e5322026bef615e0bdeb71004b57f9291823 | |
parent | d1b55219eb0c67cb9fa2d1079e52dd289b07342f (diff) | |
download | gdb-1c63c99491f9581d3f76d116cedcbfa5f124ca5a.zip gdb-1c63c99491f9581d3f76d116cedcbfa5f124ca5a.tar.gz gdb-1c63c99491f9581d3f76d116cedcbfa5f124ca5a.tar.bz2 |
Add target_ops argument to to_record_is_replaying
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_record_is_replaying>: Add
argument.
* target.c (target_record_is_replaying): Add argument.
* record-full.c (record_full_is_replaying): Add 'self' argument.
* record-btrace.c (record_btrace_is_replaying): Add 'self'
argument.
(record_btrace_xfer_partial, record_btrace_store_registers)
(record_btrace_prepare_to_store, record_btrace_resume)
(record_btrace_wait, record_btrace_decr_pc_after_break)
(record_btrace_find_new_threads, record_btrace_thread_alive):
Update.
-rw-r--r-- | gdb/ChangeLog | 14 | ||||
-rw-r--r-- | gdb/record-btrace.c | 18 | ||||
-rw-r--r-- | gdb/record-full.c | 2 | ||||
-rw-r--r-- | gdb/target.c | 2 | ||||
-rw-r--r-- | gdb/target.h | 2 |
5 files changed, 26 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 30e4bbf..2e0590a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2014-02-19 Tom Tromey <tromey@redhat.com> + * target.h (struct target_ops) <to_record_is_replaying>: Add + argument. + * target.c (target_record_is_replaying): Add argument. + * record-full.c (record_full_is_replaying): Add 'self' argument. + * record-btrace.c (record_btrace_is_replaying): Add 'self' + argument. + (record_btrace_xfer_partial, record_btrace_store_registers) + (record_btrace_prepare_to_store, record_btrace_resume) + (record_btrace_wait, record_btrace_decr_pc_after_break) + (record_btrace_find_new_threads, record_btrace_thread_alive): + Update. + +2014-02-19 Tom Tromey <tromey@redhat.com> + * target.h (struct target_ops) <to_delete_record>: Add argument. * target.c (target_delete_record): Add argument. * record-full.c (record_full_delete): Add 'self' argument. diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index fe82784..3d51f93 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -789,7 +789,7 @@ record_btrace_call_history_from (ULONGEST from, int size, int flags) /* The to_record_is_replaying method of target record-btrace. */ static int -record_btrace_is_replaying (void) +record_btrace_is_replaying (struct target_ops *self) { struct thread_info *tp; @@ -811,7 +811,7 @@ record_btrace_xfer_partial (struct target_ops *ops, enum target_object object, struct target_ops *t; /* Filter out requests that don't make sense during replay. */ - if (!record_btrace_allow_memory_access && record_btrace_is_replaying ()) + if (!record_btrace_allow_memory_access && record_btrace_is_replaying (ops)) { switch (object) { @@ -965,7 +965,7 @@ record_btrace_store_registers (struct target_ops *ops, { struct target_ops *t; - if (record_btrace_is_replaying ()) + if (record_btrace_is_replaying (ops)) error (_("This record target does not allow writing registers.")); gdb_assert (may_write_registers != 0); @@ -988,7 +988,7 @@ record_btrace_prepare_to_store (struct target_ops *ops, { struct target_ops *t; - if (record_btrace_is_replaying ()) + if (record_btrace_is_replaying (ops)) return; for (t = ops->beneath; t != NULL; t = t->beneath) @@ -1462,7 +1462,7 @@ record_btrace_resume (struct target_ops *ops, ptid_t ptid, int step, record_btrace_stop_replaying (other); /* As long as we're not replaying, just forward the request. */ - if (!record_btrace_is_replaying () && execution_direction != EXEC_REVERSE) + if (!record_btrace_is_replaying (ops) && execution_direction != EXEC_REVERSE) { for (ops = ops->beneath; ops != NULL; ops = ops->beneath) if (ops->to_resume != NULL) @@ -1678,7 +1678,7 @@ record_btrace_wait (struct target_ops *ops, ptid_t ptid, DEBUG ("wait %s (0x%x)", target_pid_to_str (ptid), options); /* As long as we're not replaying, just forward the request. */ - if (!record_btrace_is_replaying () && execution_direction != EXEC_REVERSE) + if (!record_btrace_is_replaying (ops) && execution_direction != EXEC_REVERSE) { for (ops = ops->beneath; ops != NULL; ops = ops->beneath) if (ops->to_wait != NULL) @@ -1730,7 +1730,7 @@ record_btrace_decr_pc_after_break (struct target_ops *ops, { /* When replaying, we do not actually execute the breakpoint instruction so there is no need to adjust the PC after hitting a breakpoint. */ - if (record_btrace_is_replaying ()) + if (record_btrace_is_replaying (ops)) return 0; return forward_target_decr_pc_after_break (ops->beneath, gdbarch); @@ -1742,7 +1742,7 @@ static void record_btrace_find_new_threads (struct target_ops *ops) { /* Don't expect new threads if we're replaying. */ - if (record_btrace_is_replaying ()) + if (record_btrace_is_replaying (ops)) return; /* Forward the request. */ @@ -1760,7 +1760,7 @@ static int record_btrace_thread_alive (struct target_ops *ops, ptid_t ptid) { /* We don't add or remove threads during replay. */ - if (record_btrace_is_replaying ()) + if (record_btrace_is_replaying (ops)) return find_thread_ptid (ptid) != NULL; /* Forward the request. */ diff --git a/gdb/record-full.c b/gdb/record-full.c index 6729607..d7972db 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -1825,7 +1825,7 @@ record_full_delete (struct target_ops *self) /* The "to_record_is_replaying" target method. */ static int -record_full_is_replaying (void) +record_full_is_replaying (struct target_ops *self) { return RECORD_FULL_IS_REPLAY; } diff --git a/gdb/target.c b/gdb/target.c index 9773f57..5c7bb4a 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -4347,7 +4347,7 @@ target_record_is_replaying (void) for (t = current_target.beneath; t != NULL; t = t->beneath) if (t->to_record_is_replaying != NULL) - return t->to_record_is_replaying (); + return t->to_record_is_replaying (t); return 0; } diff --git a/gdb/target.h b/gdb/target.h index 004c25f..d37db4a 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -939,7 +939,7 @@ struct target_ops void (*to_delete_record) (struct target_ops *); /* Query if the record target is currently replaying. */ - int (*to_record_is_replaying) (void); + int (*to_record_is_replaying) (struct target_ops *); /* Go to the begin of the execution trace. */ void (*to_goto_record_begin) (void); |