aboutsummaryrefslogtreecommitdiff
path: root/gdb/btrace.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2014-01-29 11:12:06 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2015-02-09 09:45:00 +0100
commit76235df10b96f85815d799b586a6bb32bc89c90f (patch)
treeadc7ee62d5371ed015deb25c96d21681d6dd9096 /gdb/btrace.c
parentd33501a51f46193387ff2d101752a9a878202f82 (diff)
downloadgdb-76235df10b96f85815d799b586a6bb32bc89c90f.zip
gdb-76235df10b96f85815d799b586a6bb32bc89c90f.tar.gz
gdb-76235df10b96f85815d799b586a6bb32bc89c90f.tar.bz2
btrace: update btrace_compute_ftrace parameters
Pass thread_info instead of btrace_thread_info to btrace_compute_ftrace. We will need the thread_info in subsequent patches. 2015-02-09 Markus Metzger <markus.t.metzger@intel.com> * btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace): Update parameters. Update users.
Diffstat (limited to 'gdb/btrace.c')
-rw-r--r--gdb/btrace.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/btrace.c b/gdb/btrace.c
index c7932bb..e96499e 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);