2021-11-21 23:59:44 +00:00
|
|
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
2021-04-03 09:10:35 +01:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2019-07-25 08:47:13 +01:00
|
|
|
|
|
|
|
#ifndef DRGN_SYMBOL_H
|
|
|
|
#define DRGN_SYMBOL_H
|
|
|
|
|
2021-08-19 22:12:44 +01:00
|
|
|
#include <gelf.h>
|
|
|
|
|
|
|
|
#include "drgn.h"
|
2019-07-25 08:47:13 +01:00
|
|
|
|
|
|
|
struct drgn_symbol {
|
|
|
|
const char *name;
|
|
|
|
uint64_t address;
|
|
|
|
uint64_t size;
|
2021-08-19 22:12:44 +01:00
|
|
|
enum drgn_symbol_binding binding;
|
|
|
|
enum drgn_symbol_kind kind;
|
2019-07-25 08:47:13 +01:00
|
|
|
};
|
|
|
|
|
2021-08-19 22:12:44 +01:00
|
|
|
/** Initialize a @ref drgn_symbol from an ELF symbol. */
|
|
|
|
void drgn_symbol_from_elf(const char *name, uint64_t address,
|
|
|
|
const GElf_Sym *elf_sym, struct drgn_symbol *ret);
|
|
|
|
|
2019-07-25 08:47:13 +01:00
|
|
|
#endif /* DRGN_SYMBOL_H */
|