tools/perf/util/dwarf-aux.h

Source file repositories/reference/linux-study-clean/tools/perf/util/dwarf-aux.h

File Facts

System
Linux kernel
Corpus path
tools/perf/util/dwarf-aux.h
Extension
.h
Size
6731 bytes
Lines
188
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct die_var_type {
	struct die_var_type *next;
	u64 die_off;
	u64 addr;
	u64 end;        /* end address of location range */
	int reg;
	int offset;
	/* Whether the register holds a address to the type */
	bool is_reg_var_addr;
	bool has_range; /* whether end is valid */
};

/* Return type info of a member at offset */
Dwarf_Die *die_get_member_type(Dwarf_Die *type_die, int offset, Dwarf_Die *die_mem);

/* Return type info where the pointer and offset point to */
Dwarf_Die *die_deref_ptr_type(Dwarf_Die *ptr_die, int offset, Dwarf_Die *die_mem);

/* Get byte offset range of given variable DIE */
int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf);

/* Find a variable saved in the 'reg' at given address */
Dwarf_Die *die_find_variable_by_reg(Dwarf_Die *sc_die, Dwarf_Addr pc, int reg,
				    Dwarf_Die *type_die, int *poffset, bool is_fbreg,
				    Dwarf_Die *die_mem);

/* Find a (global) variable located in the 'addr' */
Dwarf_Die *die_find_variable_by_addr(Dwarf_Die *sc_die, Dwarf_Addr addr,
				     Dwarf_Die *die_mem, Dwarf_Die *type_die,
				     int *offset);

/* Save all variables and parameters in this scope */
void die_collect_vars(Dwarf_Die *sc_die, struct die_var_type **var_types);

/* Save all global variables in this CU */
void die_collect_global_vars(Dwarf_Die *cu_die, struct die_var_type **var_types);

/* Get the frame base information from CFA */
int die_get_cfa(Dwarf *dwarf, u64 pc, int *preg, int *poffset);

#endif /* _DWARF_AUX_H */

Annotation

Implementation Notes