SIM_break_cycle — insert breakpoint in time queue
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
void
SIM_break_cycle(conf_object_t *NOTNULL obj, int64 cycles);
import simics
simics.SIM_break_cycle(...)
Insert a breakpoint event at cycles clock cycles from now, causing simulation to stop when reached by obj.
Cell Context
SIM_break_step — set a step breakpoint
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
void
SIM_break_step(conf_object_t *NOTNULL obj, int64 steps);
import simics
simics.SIM_break_step(...)
Sets a step breakpoint on a processor. The steps argument is the number of instructions until the break occurs.
SimExc_InterfaceNotFound Thrown if the obj object doesn’t implement the step interface.
Cell Context
SIM_breakpoint — set breakpoint
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
breakpoint_id_t
SIM_breakpoint(conf_object_t *NOTNULL obj,
breakpoint_kind_t kind,
access_t access,
uint64 address,
uint64 length,
breakpoint_flag_t flags);
typedef enum breakpoint_flag {
Sim_Breakpoint_Temporary = 1,
Sim_Breakpoint_Simulation = 2,
Sim_Breakpoint_Private = 4
} breakpoint_flag_t;
#include <simics/device-api.h> // in C
// always available in DML
typedef enum {
Sim_Break_Physical = 0,
Sim_Break_Virtual = 1,
Sim_Break_Linear = 2 /* x86 only */
} breakpoint_kind_t;
typedef int breakpoint_id_t;
// always available in DML
typedef enum {
Sim_Access_Read = 1,
Sim_Access_Write = 2,
Sim_Access_Execute = 4
} access_t;
import simics
simics.SIM_breakpoint(...)
simics.Sim_Break_Physical
simics.Sim_Break_Virtual
simics.Sim_Break_Linear
simics.Sim_Access_Execute
simics.Sim_Access_Write
simics.Sim_Access_Read
simics.Sim_Breakpoint_Simulation
simics.Sim_Breakpoint_Temporary
simics.Sim_Breakpoint_Private
Add breakpoint on an object implementing the breakpoint interface. This is typically a memory space object such as physical memory.
Please note that breakpoints set by this function may not appear in the output from bp.list. It’s recommended to use the bp.memory.break command to set breakpoints.
The kind argument sets what type of address to break on.
The access argument is a bit-field setting the type of access. Any combination of the three alternatives can be given (added together).
The address is the start of the breakpoint range and length is its length in bytes. This range will be truncated as necessary to fit in the address space. An access intersecting the given range will trigger the breakpoint. If length is zero, the breakpoint range will be the entire address space.
The flags argument should be the sum of zero or more enumeration constants from breakpoint_flag_t.
If the Sim_Breakpoint_Temporary bit is set, the breakpoint is automatically disabled when triggered the first time.
If the Sim_Breakpoint_Simulation bit is set, the breakpoint will not show up in the bp.list command, nor can it be removed by the bp.delete command. Also, there will be no message printed on the Simics console when this breakpoint is triggered. This bit should be set when using breakpoints to simulate the target system.
If the Sim_Breakpoint_Private bit is set, the breakpoint will not show up in the bp.list command, nor can it be removed by the bp.delete command.
The default action for a triggered breakpoint is to return to the frontend (this can be changed by using haps). On execution breakpoints Simics will return to the frontend before the instructions is executed, while instructions triggering read or write breakpoints will complete before control is returned to the frontend.
Several breakpoints can be set on the same address and Simics will break on them in turn. If hap handlers are connected to the breakpoints they will also be executed in turn. Hap handlers are called before the access is performed, allowing the user to read a memory value that may be overwritten by the access. See the Simics Reference Manual for a description of hap handlers.
Several attributes can be set for a breakpoint for breaking only when some conditions are true. See the breakpoints attribute in the sim class.
This function returns the breakpoint id which is used for further reference to the breakpoint.
Breakpoints can be removed using SIM_delete_breakpoint.
SimExc_General Thrown if the type or access arguments are illegal. Also thrown if obj cannot handle breakpoints of the given kind.
Breakpoint id, -1 on exception.
Cell Context
SIM_breakpoint_remove — delete breakpoint range
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
void
SIM_breakpoint_remove(int id,
access_t access,
generic_address_t address,
generic_address_t length);
import simics
simics.SIM_breakpoint_remove(...)
Deletes a breakpoint range from an existing breakpoint. Can thus be used to create holes in the breakpoint range. id is the breakpoint to operate on, as returned by SIM_breakpoint. A value of zero will operate on all breakpoints that were not set using the Sim_Breakpoint_Simulation flag.
access is a bitfield describing the type of breakpoint to remove using the enumeration constants of the access_t enum.
address is the start address of the range and length is the length of the range in bytes.
SimExc_Index Thrown if illegal breakpoint
Cell Context
SIM_delete_breakpoint — delete breakpoint
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
void
SIM_delete_breakpoint(breakpoint_id_t id);
import simics
simics.SIM_delete_breakpoint(...)
Deletes breakpoint id as returned by SIM_breakpoint. A value of zero will delete all breakpoints that were set without the Sim_Breakpoint_Simulation flag.
SimExc_Index Thrown if no breakpoint with the id is found.
Cell Context
SIM_disable_breakpoint, SIM_enable_breakpoint — disable breakpoint
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
void
SIM_disable_breakpoint(breakpoint_id_t id);
void
SIM_enable_breakpoint(breakpoint_id_t id);
import simics
simics.SIM_disable_breakpoint(...)
simics.SIM_enable_breakpoint(...)
Enables and disables breakpoint id, as returned by SIM_breakpoint.
SimExc_Index Thrown if no breakpoint with the id is found.
Cell Context