From 02d27625761a91b9ea78ab4048e1171a7b47a603 Mon Sep 17 00:00:00 2001 From: Markus Metzger Date: Mon, 11 Mar 2013 08:17:08 +0000 Subject: 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) : 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. --- gdb/gdbthread.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/gdbthread.h') diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 824e4d0..0846322 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -27,6 +27,7 @@ struct symtab; #include "frame.h" #include "ui-out.h" #include "inferior.h" +#include "btrace.h" /* Frontend view of the thread state. Possible extensions: stepping, finishing, until(ling),... */ @@ -226,6 +227,9 @@ struct thread_info /* Function that is called to free PRIVATE. If this is NULL, then xfree will be called on PRIVATE. */ void (*private_dtor) (struct private_thread_info *); + + /* Branch trace information for this thread. */ + struct btrace_thread_info btrace; }; /* Create an empty thread list, or empty the existing one. */ -- cgit v1.1