55 #ifndef ETISS_INCLUDE_GDB_GDBSERVER_H_
56 #define ETISS_INCLUDE_GDB_GDBSERVER_H_
60 #include "etiss/jit/CPU.h"
61 #include "etiss/jit/System.h"
96 unsigned a1 = (addr)&0xFFFF;
99 unsigned a2 = (addr >> 16) & 0xFFFF;
102 unsigned a3 = (addr >> 32) & 0xFFFF;
105 unsigned a4 = (addr >> 48) & 0xFFFF;
106 std::cout <<
"Breakpoint hit: " << std::hex << (addr << 2) << std::dec << std::endl;
ETISS_PLUGIN_EXPORT etiss::CPUArch std::map< std::string, std::string > options
create new instance of the CPUArch type at index
contains neccesary interfaces for instruction translation.
plugins for extensions to code translation and instruction execution
the interface to translate instructions of and processor architecture
this plugin will be called before a block is executed.
this plugin allows to wrap the ETISS_System interface
allows to add code to the translation of instructions
holds etiss::instr::VariableInstructionSet instances for different modes.
structure to store breakpoints
etiss::uint32 **** instrbrkpt_
important: index maps are reversed to instruction pointer e.g pointer(0x0102030405060708) [POINTER !...
void set(etiss::uint64 addr, etiss::uint32 val)
etiss::uint32 get(etiss::uint64 addr)
implements gdb's packet protocol
gdb server implementation that is used as a plugin in etiss
void cleanup() override
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
etiss::int32 postMemAccessCallback(etiss::int32 exception)
std::string _getPluginName() const override
void * getPluginHandle() override
called to get the handle that is available in translated code via getPoinerCode()....
etiss::int32 execute() override
called before a block and may act in the same way as a block
etiss::plugin::gdb::PacketProtocol & con_
bool status_pending_jump_
ETISS_System * unwrap(ETISS_CPU *cpu, ETISS_System *system) override
undo wrap function call this function will be called AFTER etiss::Plugin::cleanup
void init(ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch) override
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute)...
unsigned execute_skip_count
ETISS_System * wrap(ETISS_CPU *cpu, ETISS_System *system) override
SystemWrapper,.
BreakpointDB watchpoints_
unsigned execute_skip_index
Server(etiss::plugin::gdb::PacketProtocol &pp)
std::shared_ptr< Connection > cinst_
void finalizeInstrSet(etiss::instr::ModedInstructionSet &) const override
called after all instructions have been added to allow last changes
void finalizeCodeBlock(etiss::CodeBlock &) const override
called after all instructions have been translated for the code block
ETISS_System * unwrappedSys_
bool status_pending_kill_
BreakpointDB breakpoints_
void preDWriteCallback(etiss::uint64 addr)
void handlePacket(bool block)
unsigned minimal_pc_alignment
static Server * createTCPServer(std::map< std::string, std::string > options)
etiss::uint64 status_jumpaddr_
void preDReadCallback(etiss::uint64 addr)
etiss::int32 preInstructionCallback()
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
basic cpu state structure needed for execution of any cpu architecture.
memory access and time synchronization functions.