diff options
author | Markus Metzger <mmetzger@sourceware.org> | 2013-03-11 08:17:08 +0000 |
---|---|---|
committer | Markus Metzger <mmetzger@sourceware.org> | 2013-03-11 08:17:08 +0000 |
commit | 02d27625761a91b9ea78ab4048e1171a7b47a603 (patch) | |
tree | b2ccd263c72cb451d952aca550d8389ce488e6e7 /gdb/thread.c | |
parent | 7bc0ae020fedff59d2acda93cb9e78b112b350ea (diff) | |
download | gdb-02d27625761a91b9ea78ab4048e1171a7b47a603.zip gdb-02d27625761a91b9ea78ab4048e1171a7b47a603.tar.gz gdb-02d27625761a91b9ea78ab4048e1171a7b47a603.tar.bz2 |
Add branch trace information to struct thread_info.
Add functions to enable, disable, clear, and fetch a thread's branch trace.
gdb/
* target.h: Include btrace.h.
(struct target_ops) <to_supports_btrace, to_enable_btrace,
to_disable_btrace, to_teardown_btrace, to_read_btrace>: New.
* target.c (target_supports_btrace): New function.
(target_enable_btrace): New function.
(target_disable_btrace): New function.
(target_teardown_btrace): New function.
(target_read_btrace): New function.
* btrace.h: New file.
* btrace.c: New file.
* Makefile.in: Add btrace.c.
* gdbthread.h: Include btrace.h.
(struct thread_info): Add btrace field.
* thread.c: Include btrace.h.
(clear_thread_inferior_resources): Call target_teardown_btrace.
* common/btrace-common.h: New file.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 24e6413..2a1d723 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -33,6 +33,7 @@ #include "regcache.h" #include "gdb.h" #include "gdb_string.h" +#include "btrace.h" #include <ctype.h> #include <sys/types.h> @@ -116,6 +117,8 @@ clear_thread_inferior_resources (struct thread_info *tp) bpstat_clear (&tp->control.stop_bpstat); + btrace_teardown (tp); + do_all_intermediate_continuations_thread (tp, 1); do_all_continuations_thread (tp, 1); } |