Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Skip to content
BoardRunner

Plugin and callback catalog

FastDyn uses several extension mechanisms. A virtual instruction is a named action triggered at a guest PC. A run plugin prepares a feature for a CPU and may generate many internal hooks. Device handlers, physics backends, and campaign drivers have their own interfaces. Similar names do not make them interchangeable configuration namespaces.

This catalog covers the pinned main revision used by the book. For configuration snippets from your checkout, run:

fastdyn help virtuals --no-browse
fastdyn help plugins --no-browse
fastdyn help modifiers --no-browse
fastdyn help device-models --no-browse

plugins currently aliases the virtual/plugin browser. That browser shows definitions carrying public ConfigurationHelp; it does not enumerate every native callback installed by optional backends or generated by a firmware profile. A help entry also does not prove that an optional native library was included in your build.

Public core virtual instructions

These fifteen names appear in both the core native registry and Python's built-in virtual definitions. Configure them with [[CPU.cpuN.virtuals]], at, instruction, and optional args. Names are case-sensitive; raise_irq is a compatibility alias normalized to raiseirq by preparation.

Exact namePurposeImportant contract
printregPrint one registerArgument is the target register number
debug_logEmit a guest-event diagnosticArguments become a message string
updatememRead/write guest memoryUse its address/direction/length/byte-list grammar
randstateRandomize selected stateRegister numbers and addresses have different interpretation; do not randomize the PC
raiseirqRaise an interruptNumeric arguments are exception vectors; symbolic preparation is Cortex-M-specific
pulseirqPulse an interruptRequires the appropriate target IRQ semantics
raise_periodic_irqRegister a repeating interruptOptional period is in nanoseconds
timer_startStart the legacy timerSeparate from the benchmark timer
start_budgetingEnter budget waitingIntended for an experiment with a controller/budget contract
benchmark_startBegin a timing regionUses host monotonic time
bench_tickCount benchmark ticksOperates on the benchmark state
benchmark_endReport a timing region and terminate QEMUA terminal action, not a passive marker
dyninstCopy a host file into guest memoryChanges guest memory at runtime
dyninst_libLoad an ELF through the QEMU plugin APIRequires a compatible ELF and loading context
dumplogDump an internal logger bufferUses the logger-index/file argument form

These are registry names, not a promise that every action has identical meaning on every guest architecture. See virtuals and modifiers for argument grammar, register conventions, and same-PC conflicts.

Run-wide plugins

These are the six in-tree RunDefinition names discovered from feature-owned host/preprocessor.py files. Enable them with [CPU.cpuN.plugins.<name>] and enabled = true, then supply the feature's own settings.

Exact plugin namePrepared/runtime behaviorScope and output
function_counterSelect executable function entries and count hitsELF symbols; functions.tsv, final counts.tsv
function_tracerPrepare entry-argument layouts and record callsSupported DWARF/ABI forms; arguments.tsv, trace.tsv, counts
variable_watchResolve one variable or address range and observe overlapping accessesCurrent Thumb/M-profile planner; watch.tsv, events.tsv
object_sanitizerSelect objects/allocation sites and track supported provenanceCurrent Thumb/M-profile planner; object lifecycle and violation records
introspectionIdentify supported RTOS hooks and prepare kernel schemasAdapter-specific task/resource events; schema.txt, activity.jsonl
worldPrepare a physical-world description and firmware pin bindingsRequires built tools/world native dependency; world state and optional observation

The first five native modules are included by the normal virtuals/meson.build feature list. World is automatically compiled when the expected header and tools/world/build/libworld_model.so exist. Enabling its TOML table cannot manufacture a missing native runtime.

The narrative guides cover tracing and object checking, RTOS introspection, and World integration.

Internal callbacks belong to their feature

Run plugins may register native callbacks that are implementation details. For example, Function Counter generates function_counter; ObjectSan uses object_sanitizer_alloc_call, object_sanitizer_alloc_return, and object_sanitizer_free; World uses world_digital_out and world_analog_in. Introspection selects numerous RTOS-specific hook names from the firmware.

Configure the owning plugin rather than manually reproducing its schema and internal rules. The callback registry only connects a name to native behavior; it does not supply the prepared manifest, target layout, or correct argument convention by itself. Two plugins that generate different callbacks at the same PC still encounter the dispatcher's one-callback restriction.

Optional mechanisms and their gates

MechanismHow it is selectedBuild/runtime requirement
Inline modifiersCPU modifiers arrayPatched target backend; register/width semantics are architecture-specific
Specialized inline I/O[Machine].finlineStatic access-map path with explicit backing state and original-instruction handling; see inline device modeling
Device handlers[Device.Models.*] and handler assignmentsDevice-model build; hardware paths also require libhw
Vehicle physics[FMU], physics options, and controller profilesPHY=true; FMU=true for FMUs; FLIGHT_CONTROLLERS=true for controller adapters
Legacy Gazebo physicsSelected Gazebo backendPHY=true LIBGZ=true and matching Gazebo dependencies
Native firmware fuzzingMachine fuzzing/coverage settings and a harnessLibAFL or AFLNet build; initialized coverage and snapshot ranges
External runtime pluginPlugin table's source folderRegistered host half and compatible runtime/*.so descriptor/SDK linkage
Swarm/campaign orchestrationCLI or downstream driverSeparate worker configuration and dependencies; not a run-plugin name

The feature browser advertises device-handler names classic, passthrough, elder, twintrace, and unhandled. These are not virtual instruction names. The legacy halucinator/Python embedding path is separately gated and is documented upstream as currently failing to build.

When a native fuzzing build initializes with coverage, it registers assert, fuzz_advance_time, fuzz_snap_point, fuzz_snap_sync_point, fuzz_state_point, fuzz_sync_point, and fuzz_virtual_millis. These are conditional native callbacks, not additional public core definitions. Use the fuzzing harness guide for their lifecycle rather than assuming they exist in the minimal build.

Controller integrations likewise register profile-specific actions such as start_advancing_sim, ins_block_read, write_channel, and bridge_px4_uorb. Their names and ABI expectations belong to the flight-controller integration, not a generic sensor protocol.

Adding a new feature

Register user-facing help beside the feature, keep derived data in artifacts, and declare required capabilities on virtual definitions where applicable. The generic preparation code supplies core, conditionally fuzzing and fmu, plus explicit host-provided capabilities. Build options, available artifacts, target support, and enablement remain separate facts that the feature must handle consistently.

See writing plugins for the supported host/native registration and external-plugin workflow.

Source guide