36 lines
711 B
C++
36 lines
711 B
C++
|
#ifndef fk_SYMENTRY_HPP
|
||
|
#define fk_SYMENTRY_HPP
|
||
|
|
||
|
#include "commons.hpp"
|
||
|
#include "Loc.hpp"
|
||
|
|
||
|
namespace fk
|
||
|
{
|
||
|
class SymEntry
|
||
|
{
|
||
|
public:
|
||
|
explicit SymEntry(std::string const& name,
|
||
|
addr_t addr,
|
||
|
bool is_global,
|
||
|
Loc const& loc);
|
||
|
virtual ~SymEntry();
|
||
|
|
||
|
std::string name() const { return m_name; }
|
||
|
addr_t addr() const { return m_addr; }
|
||
|
bool is_global() const { return m_is_global; }
|
||
|
Loc loc() const { return m_loc; }
|
||
|
|
||
|
void set_global(bool global) { m_is_global = global; }
|
||
|
|
||
|
std::string string() const;
|
||
|
|
||
|
private:
|
||
|
std::string m_name;
|
||
|
addr_t m_addr;
|
||
|
bool m_is_global = false;
|
||
|
Loc m_loc;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|