This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 06/12] btrace: update btrace_compute_ftrace parameters
- From: Markus Metzger <markus dot t dot metzger at intel dot com>
- To: palves at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 14 Jul 2014 15:56:30 +0200
- Subject: [PATCH 06/12] btrace: update btrace_compute_ftrace parameters
- Authentication-results: sourceware.org; auth=none
- References: <1405346196-1804-1-git-send-email-markus dot t dot metzger at intel dot com>
Pass thread_info instead of btrace_thread_info to btrace_compute_ftrace.
We will need the thread_info in subsequent patches.
2014-07-14 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
Update parameters. Update users.
---
gdb/btrace.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/gdb/btrace.c b/gdb/btrace.c
index 0eb5f1f..d96994d 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -588,15 +588,17 @@ ftrace_update_insns (struct btrace_function *bfun, CORE_ADDR pc)
/* Compute the function branch trace from BTS trace. */
static void
-btrace_compute_ftrace_bts (struct btrace_thread_info *btinfo,
+btrace_compute_ftrace_bts (struct thread_info *tp,
const struct btrace_data_bts *btrace)
{
+ struct btrace_thread_info *btinfo;
struct btrace_function *begin, *end;
struct gdbarch *gdbarch;
unsigned int blk;
int level;
gdbarch = target_gdbarch ();
+ btinfo = &tp->btrace;
begin = btinfo->begin;
end = btinfo->end;
level = begin != NULL ? -btinfo->level : INT_MAX;
@@ -676,8 +678,7 @@ btrace_compute_ftrace_bts (struct btrace_thread_info *btinfo,
a thread given by BTINFO. */
static void
-btrace_compute_ftrace (struct btrace_thread_info *btinfo,
- struct btrace_data *btrace)
+btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace)
{
DEBUG ("compute ftrace");
@@ -687,7 +688,7 @@ btrace_compute_ftrace (struct btrace_thread_info *btinfo,
return;
case BTRACE_FORMAT_BTS:
- btrace_compute_ftrace_bts (btinfo, &btrace->variant.bts);
+ btrace_compute_ftrace_bts (tp, &btrace->variant.bts);
return;
}
@@ -718,7 +719,7 @@ btrace_add_pc (struct thread_info *tp)
block->begin = pc;
block->end = pc;
- btrace_compute_ftrace (&tp->btrace, &btrace);
+ btrace_compute_ftrace (tp, &btrace);
do_cleanups (cleanup);
}
@@ -964,7 +965,7 @@ btrace_fetch (struct thread_info *tp)
if (!btrace_data_empty (&btrace))
{
btrace_clear_history (btinfo);
- btrace_compute_ftrace (btinfo, &btrace);
+ btrace_compute_ftrace (tp, &btrace);
}
do_cleanups (cleanup);
--
1.8.3.1