diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2013-04-26 08:37:06 +0200 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2014-01-16 13:06:09 +0100 |
commit | 07bbe694e779f4953911a50751abdc00117be7d3 (patch) | |
tree | a8da63d6506d00e24eb7cab38fa734a33a46c971 /gdb/btrace.h | |
parent | 0688d04e19c0e6305c1034eb5e97a66458fd805a (diff) | |
download | gdb-07bbe694e779f4953911a50751abdc00117be7d3.zip gdb-07bbe694e779f4953911a50751abdc00117be7d3.tar.gz gdb-07bbe694e779f4953911a50751abdc00117be7d3.tar.bz2 |
btrace: add replay position to btrace thread info
Add a branch trace instruction iterator pointing to the current replay position
to the branch trace thread info struct.
Free the iterator when btrace is cleared.
Start at the replay position for the instruction and function-call histories.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* btrace.h (replay) <replay>: New.
(btrace_is_replaying): New.
* btrace.c (btrace_clear): Free replay iterator.
(btrace_is_replaying): New.
* record-btrace.c (record_btrace_is_replaying): New.
(record_btrace_info): Print insn number if replaying.
(record_btrace_insn_history): Start at replay position.
(record_btrace_call_history): Start at replay position.
(init_record_btrace_ops): Init to_record_is_replaying.
Diffstat (limited to 'gdb/btrace.h')
-rw-r--r-- | gdb/btrace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/btrace.h b/gdb/btrace.h index d219f69..93e6940 100644 --- a/gdb/btrace.h +++ b/gdb/btrace.h @@ -187,6 +187,9 @@ struct btrace_thread_info /* The function call history iterator. */ struct btrace_call_history *call_history; + + /* The current replay position. NULL if not replaying. */ + struct btrace_insn_iterator *replay; }; /* Enable branch tracing for a thread. */ @@ -308,4 +311,7 @@ extern void btrace_set_call_history (struct btrace_thread_info *, const struct btrace_call_iterator *begin, const struct btrace_call_iterator *end); +/* Determine if branch tracing is currently replaying TP. */ +extern int btrace_is_replaying (struct thread_info *tp); + #endif /* BTRACE_H */ |