die_walk_instances(9)
π die_walk_instances(9) β the Kernel API Manual, bestie edition
okay so this is die_walk_instances from the kernel API manual (section 9, the kernel-functions one) β and yes it's a whole vibe, let's get into it β¨
πΈ NAME πΈ
die_walk_instances β walk the instances of a given DIE, literally that's the whole job π«Ά
β¨ SYNOPSIS β¨
int die_walk_instances (Dwarf_Die *or_die , int (*callback)(Dwarf_Die *,
void *) , void *data );
no cap, that's the whole signature π
π ARGUMENTS π
or_dieβ an abstract original DIE. that's the starting point, the main character of this whole operation πcallbackβ the callback function, and it gets called with each instance DIE. like it gets handed the instance, fr fr π¦dataβ user data. your stuff, your business, passed straight through π
π₯ DESCRIPTION π₯
so you're walking on the instances of the given in_die (yes, the description calls it in_die while the signature says or_die β that's just how it is, we don't question the lore π).
in_die must be an inlined function declaration. like, that's not a suggestion, that's the requirement π
what it returns:
- the return value of
callback, if the callback returns a non-zero value β it bails out right there and hands you back whatever your callback said πββοΈπ¨ -ENOENTif there is no instance. no instance, no problem, just a negative errno in your lap π
π SEE ALSO π
bestie the whole friend group is here, and they're all icons β also peep the kernel file ./tools/perf/util/dwarf-aux.c:
cu_find_realpath(9)cu_get_comp_dir(9)cu_find_lineinfo(9)cu_walk_functions_at(9)die_get_linkage_name(9)die_compare_name(9)die_match_name(9)die_get_call_lineno(9)die_get_type(9)die_get_real_type(9)die_get_pointer_type(9)die_is_signed_type(9)die_is_func_def(9)die_entrypc(9)die_is_func_instance(9)die_get_data_member_location(9)die_get_call_file(9)die_get_decl_file(9)die_find_child(9)die_find_tailfunc(9)die_find_realfunc(9)die_find_top_inlinefunc(9)die_find_inlinefunc(9)die_find_func_rettype(9)die_walk_lines(9)die_find_variable_at(9)die_find_member(9)die_get_typename_from_type(9)die_get_typename(9)die_get_varname(9)die_get_var_innermost_scope(9)die_get_var_range(9)is_breg_access_indirect(9)die_find_variable_by_reg(9)die_find_variable_by_addr(9)die_collect_vars(9)die_collect_global_vars(9)die_get_cfa(9)die_get_scopes(9)die_get_member_type(9)die_deref_ptr_type(9)
and that's the page, periodt π
this one lives under ./tools/perf/util and the version stamp says October 2026 β so yeah, it's giving very much current, very much slay, go off kernel docs πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms