ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Static Public Attributes | List of all members
etiss::plugin::gdb::GDBCore Class Reference

provides to architecture dependent registers as defined by gdb More...

#include <GDBCore.h>

Inheritance diagram for etiss::plugin::gdb::GDBCore:
Inheritance graph
[legend]
Collaboration diagram for etiss::plugin::gdb::GDBCore:
Collaboration graph
[legend]

Public Member Functions

virtual ~GDBCore ()
 
virtual std::string mapRegister (unsigned index)
 the returned string identifies the register at the given index as defined by gdb. More...
 
virtual unsigned mapRegister (std::string name)
 returns the index of the given register name in the list of registers as defined by gdb. More...
 
virtual unsigned mappedRegisterCount ()
 returns the number of registers in the gdb defined register list More...
 
virtual bool isLittleEndian ()
 returns true if the values are expected to be little endian More...
 
virtual etiss::uint64 getInstructionPointer (ETISS_CPU *cpu)
 allows to calculate the index of the instruction to be executed for breakpoint checks. More...
 

Static Public Attributes

static const unsigned INVALIDMAPPING = (unsigned)-1
 

Detailed Description

provides to architecture dependent registers as defined by gdb

gdb requires a predefined archtecture specific list of registers. Information about this list is provided by this class

Definition at line 76 of file GDBCore.h.

Constructor & Destructor Documentation

◆ ~GDBCore()

GDBCore::~GDBCore ( )
virtual

Definition at line 57 of file GDBCore.cpp.

Member Function Documentation

◆ getInstructionPointer()

etiss::uint64 GDBCore::getInstructionPointer ( ETISS_CPU cpu)
virtual

allows to calculate the index of the instruction to be executed for breakpoint checks.

returns cpu->instructionPointer by default.

the OR1K architecture uses this to account for an invalid instruction pointer in case of a delay slot instruction

Reimplemented in RV64IMACFDGDBCore, and RV32IMACFDGDBCore.

Definition at line 74 of file GDBCore.cpp.

References ETISS_CPU::instructionPointer.

Referenced by etiss::plugin::gdb::Server::preInstructionCallback().

Here is the caller graph for this function:

◆ isLittleEndian()

bool GDBCore::isLittleEndian ( )
virtual

returns true if the values are expected to be little endian

Reimplemented in RV64IMACFDGDBCore, and RV32IMACFDGDBCore.

Definition at line 70 of file GDBCore.cpp.

Referenced by etiss::plugin::gdb::Server::handlePacket().

Here is the caller graph for this function:

◆ mappedRegisterCount()

unsigned GDBCore::mappedRegisterCount ( )
virtual

returns the number of registers in the gdb defined register list

Reimplemented in RV64IMACFDGDBCore, and RV32IMACFDGDBCore.

Definition at line 66 of file GDBCore.cpp.

◆ mapRegister() [1/2]

unsigned GDBCore::mapRegister ( std::string  name)
virtual

returns the index of the given register name in the list of registers as defined by gdb.

max return INVALIDMAPPING if the passed name is not in the list

Reimplemented in RV64IMACFDGDBCore, and RV32IMACFDGDBCore.

Definition at line 62 of file GDBCore.cpp.

References INVALIDMAPPING.

◆ mapRegister() [2/2]

std::string GDBCore::mapRegister ( unsigned  index)
virtual

the returned string identifies the register at the given index as defined by gdb.

the returned string must match the get/setRegisterXX() functions of etiss::CPUArch

Reimplemented in RV64IMACFDGDBCore, and RV32IMACFDGDBCore.

Definition at line 58 of file GDBCore.cpp.

Referenced by etiss::plugin::gdb::Server::handlePacket().

Here is the caller graph for this function:

Member Data Documentation

◆ INVALIDMAPPING

const unsigned etiss::plugin::gdb::GDBCore::INVALIDMAPPING = (unsigned)-1
static

The documentation for this class was generated from the following files: