From 4aeb0dfcc42acfc108d3f870384d1719adc9569b Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Tue, 30 May 2017 12:47:37 +0200 Subject: 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. --- gdb/btrace.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'gdb/btrace.h') diff --git a/gdb/btrace.h b/gdb/btrace.h index cd3f346..ed5fe91 100644 --- a/gdb/btrace.h +++ b/gdb/btrace.h @@ -85,13 +85,6 @@ struct btrace_insn typedef struct btrace_insn btrace_insn_s; DEF_VEC_O (btrace_insn_s); -/* A doubly-linked list of branch trace function segments. */ -struct btrace_func_link -{ - struct btrace_function *prev; - struct btrace_function *next; -}; - /* Flags for btrace function segments. */ enum btrace_function_flag { @@ -146,10 +139,12 @@ struct btrace_function struct minimal_symbol *msym; struct symbol *sym; - /* The previous and next segment belonging to the same function. - If a function calls another function, the former will have at least - two segments: one before the call and another after the return. */ - struct btrace_func_link segment; + /* The function segment numbers of the previous and next segment belonging to + the same function. If a function calls another function, the former will + have at least two segments: one before the call and another after the + return. Will be zero if there is no such function segment. */ + unsigned int prev; + unsigned int next; /* The function segment number of the directly preceding function segment in a (fake) call stack. Will be zero if there is no such function segment in -- cgit v1.1