Go to the documentation of this file.
19 #ifndef ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_
20 #define ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_
26 #include "absl/base/config.h"
30 #ifdef ABSL_HAVE_ELF_MEM_IMAGE
31 #error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set
34 #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \
35 !defined(__native_client__) && !defined(__asmjs__) && \
36 !defined(__wasm__) && !defined(__HAIKU__)
37 #define ABSL_HAVE_ELF_MEM_IMAGE 1
40 #ifdef ABSL_HAVE_ELF_MEM_IMAGE
44 #if defined(__FreeBSD__) && !defined(ElfW)
45 #define ElfW(x) __ElfN(x)
50 namespace debugging_internal {
56 static const int kInvalidBaseSentinel;
60 static constexpr
const void *
const kInvalidBase =
61 static_cast<const void*
>(&kInvalidBaseSentinel);
71 const ElfW(Sym) *symbol;
75 class SymbolIterator {
77 friend class ElfMemImage;
78 const SymbolInfo *operator->()
const;
81 bool operator!=(
const SymbolIterator &rhs)
const;
82 bool operator==(
const SymbolIterator &rhs)
const;
84 SymbolIterator(
const void *
const image,
int index);
88 const void *
const image_;
92 explicit ElfMemImage(
const void *
base);
94 bool IsPresent()
const {
return ehdr_ !=
nullptr; }
95 const ElfW(Phdr)* GetPhdr(
int index)
const;
96 const ElfW(Sym)* GetDynsym(
int index)
const;
97 const ElfW(Versym)* GetVersym(
int index)
const;
98 const ElfW(Verdef)* GetVerdef(
int index)
const;
99 const ElfW(Verdaux)* GetVerdefAux(
const ElfW(Verdef) *verdef)
const;
100 const char* GetDynstr(ElfW(Word)
offset)
const;
101 const void* GetSymAddr(
const ElfW(Sym) *sym)
const;
102 const char* GetVerstr(ElfW(Word)
offset)
const;
103 int GetNumSymbols()
const;
105 SymbolIterator
begin()
const;
106 SymbolIterator
end()
const;
112 bool LookupSymbol(
const char *
name,
const char *
version,
113 int symbol_type, SymbolInfo *info_out)
const;
119 bool LookupSymbolByAddress(
const void *address, SymbolInfo *info_out)
const;
122 const ElfW(Ehdr) *ehdr_;
123 const ElfW(Sym) *dynsym_;
124 const ElfW(Versym) *versym_;
125 const ElfW(Verdef) *verdef_;
126 const ElfW(Word) *hash_;
130 ElfW(Addr) link_base_;
137 #endif // ABSL_HAVE_ELF_MEM_IMAGE
139 #endif // ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_
static int Init(CMessage *self, PyObject *args, PyObject *kwargs)
bool IsPresent(const void *base, uint32 hasbit)
#define ABSL_NAMESPACE_END
experimental::ClientRpcInfo * info_
uint128 operator*(uint128 lhs, uint128 rhs)
#define ABSL_NAMESPACE_BEGIN
bool operator==(const absl::InlinedVector< T, N, A > &a, const absl::InlinedVector< T, N, A > &b)
bool operator!=(const absl::InlinedVector< T, N, A > &a, const absl::InlinedVector< T, N, A > &b)
static void operator++(Engine &e, int unused)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:18