|
@@ -342,6 +342,16 @@ static struct symbol *symbols__first(struct rb_root *symbols)
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
+static struct symbol *symbols__next(struct symbol *sym)
|
|
|
+{
|
|
|
+ struct rb_node *n = rb_next(&sym->rb_node);
|
|
|
+
|
|
|
+ if (n)
|
|
|
+ return rb_entry(n, struct symbol, rb_node);
|
|
|
+
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
struct symbol_name_rb_node {
|
|
|
struct rb_node rb_node;
|
|
|
struct symbol sym;
|
|
@@ -412,11 +422,16 @@ struct symbol *dso__find_symbol(struct dso *dso,
|
|
|
return symbols__find(&dso->symbols[type], addr);
|
|
|
}
|
|
|
|
|
|
-static struct symbol *dso__first_symbol(struct dso *dso, enum map_type type)
|
|
|
+struct symbol *dso__first_symbol(struct dso *dso, enum map_type type)
|
|
|
{
|
|
|
return symbols__first(&dso->symbols[type]);
|
|
|
}
|
|
|
|
|
|
+struct symbol *dso__next_symbol(struct symbol *sym)
|
|
|
+{
|
|
|
+ return symbols__next(sym);
|
|
|
+}
|
|
|
+
|
|
|
struct symbol *dso__find_symbol_by_name(struct dso *dso, enum map_type type,
|
|
|
const char *name)
|
|
|
{
|