Skip to content

CPUDebuggerAPI ​

cpp
#include <VAmiga.h>
cpp
class CPUDebuggerAPI

Defined in VAmiga.h:754

API of the CPU debugger (disassembler and dumps).

Public Methods ​

ReturnNameDescription
isizeloggedInstructions constReturns the number of instructions in the record buffer.
voidclearLogEmpties the record buffer.
stringdisassemble constDisassembles an instruction.
stringdisassembleRecorded constDisassembles an instruction from the log buffer.
stringvectorName constReturns the name of an exception vector.

loggedInstructions ​

const

cpp
isize loggedInstructions() const

Defined in VAmiga.h:768

Returns the number of instructions in the record buffer.

NOTE

The record buffer is only filled in track mode. To save computation time, the GUI enables track mode when the CPU inspector is opened and disables track mode when it is closed.


clearLog ​

cpp
void clearLog()

Defined in VAmiga.h:772

Empties the record buffer.


disassemble ​

const

cpp
string disassemble(u32 addr, const string & fmt, isize * len = nullptr) const

Defined in VAmiga.h:787

Disassembles an instruction.

Returns ​

The disassembled text.

Parameters ​

ParameterTypeDescription
addru32Address of the instruction to disassemble
fmtconst string &String defining the output format. The directives are p (address), b (instruction words), i (instruction), f (status register flags), Nd (data register DN) and Na (address register AN, N = 0 ... 7). A number in front of p, b, i, or f pads the output with spaces to the given width. The register directives show the current register contents.
lenisize *If given, receives the length of the instruction in bytes.

Exceptions ​

ExceptionDescription
CoreError(CoreError::OPT_INV_ARG) if the format string is invalid.

disassembleRecorded ​

const

cpp
string disassembleRecorded(isize nr, const string & fmt, isize * len = nullptr) const

Defined in VAmiga.h:798

Disassembles an instruction from the log buffer.

Returns ​

The disassembled text.

Parameters ​

ParameterTypeDescription
nrisizeIndex of the instruction in the record buffer
fmtconst string &String defining the output format (see disassemble()). The register directives show the register contents at the time the instruction was recorded.
lenisize *If given, receives the length of the instruction in bytes.

Exceptions ​

ExceptionDescription
CoreError(CoreError::OPT_INV_ARG) if the format string is invalid.

vectorName ​

const

cpp
string vectorName(isize i) const

Defined in VAmiga.h:805

Returns the name of an exception vector.

Returns ​

A readable name (e.g., "Bus error"), or "Reserved" or a generic name for vectors without a fixed meaning.

Parameters ​

ParameterTypeDescription
iisizeVector number (0 ... 255)