From 76235df10b96f85815d799b586a6bb32bc89c90f Mon Sep 17 00:00:00 2001 From: Markus Metzger Date: Wed, 29 Jan 2014 11:12:06 +0100 Subject: [PATCH] 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 * btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace): Update parameters. Update users. --- gdb/ChangeLog | 5 +++++ gdb/btrace.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f3347e90a7e..b0a09083ad4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-02-09 Markus Metzger + + * btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace): + Update parameters. Update users. + 2015-02-09 Markus Metzger * btrace.c (parse_xml_btrace_conf_bts): Add size. diff --git a/gdb/btrace.c b/gdb/btrace.c index c7932bb3308..e96499eaf1b 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); -- 2.30.2