mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 13:52:50 +01:00
In Makefile.config for unwinding the name dwarf implies either libunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is really just defined when libdw is present by renaming to HAVE_LIBDW_SUPPORT. Signed-off-by: Ian Rogers <[email protected]> Acked-by: Namhyung Kim <[email protected]> Tested-by: Leo Yan <[email protected]> Cc: Anup Patel <[email protected]> Cc: Yang Jihong <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: David S. Miller <[email protected]> Cc: Albert Ou <[email protected]> Cc: Shenlin Liang <[email protected]> Cc: Nick Terrell <[email protected]> Cc: Guilherme Amadio <[email protected]> Cc: Steinar H. Gunderson <[email protected]> Cc: Changbin Du <[email protected]> Cc: Alexander Lobakin <[email protected]> Cc: Przemek Kitszel <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Guo Ren <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Masami Hiramatsu (Google) <[email protected]> Cc: Will Deacon <[email protected]> Cc: James Clark <[email protected]> Cc: Mike Leach <[email protected]> Cc: Chen Pei <[email protected]> Cc: Leo Yan <[email protected]> Cc: Oliver Upton <[email protected]> Cc: Aditya Gupta <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Bibo Mao <[email protected]> Cc: John Garry <[email protected]> Cc: Atish Patra <[email protected]> Cc: Dima Kogan <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Dr. David Alan Gilbert <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
67 lines
1.5 KiB
C
67 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef _PERF_DEBUGINFO_H
|
|
#define _PERF_DEBUGINFO_H
|
|
|
|
#include <errno.h>
|
|
#include <linux/compiler.h>
|
|
|
|
#ifdef HAVE_LIBDW_SUPPORT
|
|
|
|
#include "dwarf-aux.h"
|
|
|
|
/* debug information structure */
|
|
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 */
|