add VarInfo struct and methods for finding specific variables
This commit is contained in:
parent
6e8cfba046
commit
01c96b0467
@ -4,15 +4,24 @@
|
||||
#include <cstdint>
|
||||
#include <libdwarf.h>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
template <typename T> using ptr = std::unique_ptr<T>;
|
||||
|
||||
struct VarInfo {
|
||||
std::string name;
|
||||
Dwarf_Addr address;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
class Symbol {
|
||||
public:
|
||||
bool is_integer_type(Dwarf_Debug dbg, Dwarf_Die die);
|
||||
Dwarf_Addr get_global_var_addr(Dwarf_Debug dbg, Dwarf_Die die);
|
||||
size_t get_var_size(Dwarf_Debug dbg, Dwarf_Die die);
|
||||
void list_global_integer_vars(Dwarf_Debug dbg);
|
||||
std::optional<VarInfo> find_global_var(Dwarf_Debug dbg, const std::string &var_name);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user