1#ifndef ROSE_BinaryAnalysis_Debugger_Base_H 
    2#define ROSE_BinaryAnalysis_Debugger_Base_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    5#include <Rose/BinaryAnalysis/Debugger/BasicTypes.h> 
    7#include <Rose/BinaryAnalysis/AddressIntervalSet.h> 
    8#include <Rose/BinaryAnalysis/BasicTypes.h> 
    9#include <Rose/BinaryAnalysis/ByteOrder.h> 
   10#include <Rose/BinaryAnalysis/Debugger/ThreadId.h> 
   11#include <Rose/Constants.h> 
   13#include <Sawyer/BitVector.h> 
   14#include <Sawyer/SharedObject.h> 
   15#include <Sawyer/Trace.h> 
   18namespace BinaryAnalysis {
 
   38    Base& operator=(
const Base&) = 
delete;
 
  136    template<
class Filter>
 
  225        size_t n = 
writeMemory(va, 
sizeof(T), (
const uint8_t*)&value);
 
  226        ASSERT_always_require(n == 
sizeof(T));
 
 
 
Base class for debuggers.
 
Sawyer::Container::Trace< Address > trace(ThreadId tid, Filter &filter)
Run the program and return an execution trace.
 
virtual AddressIntervalSet breakPoints()=0
All known breakpoints.
 
virtual void runToBreakPoint(ThreadId)=0
Run until the next breakpoint is reached.
 
virtual void clearBreakPoint(const AddressInterval &)=0
Remove breakpoints.
 
virtual void writeAllRegisters(ThreadId, const Sawyer::Container::BitVector &)=0
Write all registers as a single bit vector.
 
virtual void executionAddress(ThreadId, Address)
Execution address.
 
virtual Sawyer::Container::BitVector readMemory(Address va, size_t nBytes, ByteOrder::Endianness order)=0
Read subordinate memory as a bit vector.
 
virtual std::string registerName(RegisterDescriptor)
Convert a register descriptor to a register name.
 
virtual Sawyer::Container::Trace< Address > trace()
Run the program and return an execution trace.
 
virtual bool isAttached()=0
Tests whether this debugger is attached to a specimen.
 
virtual void singleStep(ThreadId)=0
Execute one machine instruction.
 
virtual void writeRegister(ThreadId, RegisterDescriptor, uint64_t value)=0
Write subordinate register.
 
void writeMemory(Address va, const T &value)
Write subordinate memory.
 
virtual Address executionAddress(ThreadId)
Execution address.
 
virtual Sawyer::Container::BitVector readRegister(ThreadId, RegisterDescriptor)=0
Read subordinate register.
 
virtual std::vector< uint8_t > readMemory(Address va, size_t nBytes)=0
Read subordinate memory as an array of bytes.
 
virtual std::string howTerminated()=0
String describing how the subordinate process terminated.
 
virtual std::vector< ThreadId > threadIds()=0
List of subordinate threads.
 
virtual void writeRegister(ThreadId, RegisterDescriptor, const Sawyer::Container::BitVector &)=0
Write subordinate register.
 
virtual void setBreakPoint(const AddressInterval &)=0
Set breakpoints.
 
virtual bool isTerminated()=0
Returns true if the subordinate terminated.
 
virtual size_t readMemory(Address va, size_t nBytes, uint8_t *buffer)=0
Read subordinate memory.
 
virtual void terminate()=0
Terminate the specimen.
 
virtual std::vector< RegisterDescriptor > availableRegisters()=0
List of available registers.
 
virtual void detach()=0
Detach from a specimen.
 
virtual size_t writeMemory(Address va, size_t nBytes, const uint8_t *bytes)=0
Writes some bytes to subordinate memory.
 
virtual std::string readCString(Address va, size_t maxBytes=UNLIMITED)
Read C-style NUL-terminated string from subordinate.
 
virtual Disassembler::BasePtr disassembler()
Property: Disassembler.
 
virtual Sawyer::Container::BitVector readAllRegisters(ThreadId)=0
Read all available register values as a single bit vector.
 
virtual RegisterDictionaryPtr registerDictionary()
Register dictionary for the architecture.
 
virtual void clearBreakPoints()=0
Remove all breakpoints.
 
Describes (part of) a physical CPU register.
 
Stores a vector of enum bit flags.
 
bool isClear(Enum e) const
Test whether a bit is clear.
 
bool isSet(Enum e) const
Test whether a bit is set.
 
Records and replays traces.
 
void append(const Label &label)
Append a label to a trace.
 
Base class for reference counted objects.
 
@ REJECT
Reject the current address, not appending it to the trace.
 
@ STOP
Abort tracing, either appending or rejecting the current address.
 
std::uint64_t Address
Address.
 
const size_t UNLIMITED
Effectively unlimited size.