tools/perf/util/debuginfo.h
Source file repositories/reference/linux-study-clean/tools/perf/util/debuginfo.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/debuginfo.h- Extension
.h- Size
- 1565 bytes
- Lines
- 67
- 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.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
errno.hlinux/compiler.hdwarf-aux.h
Detected Declarations
struct debuginfostruct debuginfofunction debuginfo__deletefunction debuginfo__get_text_offsetfunction get_source_from_debuginfod
Annotated Snippet
struct debuginfo {
Dwarf *dbg;
Dwfl_Module *mod;
Dwfl *dwfl;
Dwarf_Addr bias;
const unsigned char *build_id;
};
/* This also tries to open distro debuginfo */
struct debuginfo *debuginfo__new(const char *path);
void debuginfo__delete(struct debuginfo *dbg);
int debuginfo__get_text_offset(struct debuginfo *dbg, Dwarf_Addr *offs,
bool adjust_offset);
#else /* HAVE_LIBDW_SUPPORT */
/* dummy debug information structure */
struct debuginfo {
};
static inline struct debuginfo *debuginfo__new(const char *path __maybe_unused)
{
return NULL;
}
static inline void debuginfo__delete(struct debuginfo *dbg __maybe_unused)
{
}
typedef void Dwarf_Addr;
static inline int debuginfo__get_text_offset(struct debuginfo *dbg __maybe_unused,
Dwarf_Addr *offs __maybe_unused,
bool adjust_offset __maybe_unused)
{
return -EINVAL;
}
#endif /* HAVE_LIBDW_SUPPORT */
#ifdef HAVE_DEBUGINFOD_SUPPORT
int get_source_from_debuginfod(const char *raw_path, const char *sbuild_id,
char **new_path);
#else /* HAVE_DEBUGINFOD_SUPPORT */
static inline int get_source_from_debuginfod(const char *raw_path __maybe_unused,
const char *sbuild_id __maybe_unused,
char **new_path __maybe_unused)
{
return -ENOTSUP;
}
#endif /* HAVE_DEBUGINFOD_SUPPORT */
#endif /* _PERF_DEBUGINFO_H */
Annotation
- Immediate include surface: `errno.h`, `linux/compiler.h`, `dwarf-aux.h`.
- Detected declarations: `struct debuginfo`, `struct debuginfo`, `function debuginfo__delete`, `function debuginfo__get_text_offset`, `function get_source_from_debuginfod`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.