summaryrefslogtreecommitdiff
path: root/gdb/record-btrace.c
diff options
context:
space:
mode:
authorTim Wiederhake <tim.wiederhake@intel.com>2017-05-30 12:47:37 +0200
committerTim Wiederhake <tim.wiederhake@intel.com>2017-05-30 12:49:25 +0200
commit4aeb0dfcc42acfc108d3f870384d1719adc9569b (patch)
tree86ab32777669773fc1631319e29d595303df661d /gdb/record-btrace.c
parenteb8f2b9c44619eecdb3b77da01da910fcf05abed (diff)
btrace: Replace struct btrace_function::segment.
This used to hold a pair of pointers to the previous and next function segment that belong to this function call. Replace with a pair of indices into the vector of function segments.
Diffstat (limited to 'gdb/record-btrace.c')
-rw-r--r--gdb/record-btrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 41f95b3596..55bc7a1a3a 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -1584,6 +1584,7 @@ record_btrace_frame_this_id (struct frame_info *this_frame, void **this_cache,
{
const struct btrace_frame_cache *cache;
const struct btrace_function *bfun;
+ struct btrace_call_iterator it;
CORE_ADDR code, special;
cache = (const struct btrace_frame_cache *) *this_cache;
@@ -1591,8 +1592,8 @@ record_btrace_frame_this_id (struct frame_info *this_frame, void **this_cache,
bfun = cache->bfun;
gdb_assert (bfun != NULL);
- while (bfun->segment.prev != NULL)
- bfun = bfun->segment.prev;
+ while (btrace_find_call_by_number (&it, &cache->tp->btrace, bfun->prev) != 0)
+ bfun = btrace_call_get (&it);
code = get_frame_func (this_frame);
special = bfun->number;