A high-level language, architecture-independent probe program compiler is
disclosed. A base program is executable by one or processors, and has one
or more breakpoints. A probe program is associated with each breakpoint
and is also indirectly executable by the one or more processors. The
probe program is independent of the architecture of the processors, and
is generated from source code written in a high-level language. The probe
program associated with each breakpoint is executed when the breakpoint
is reached during execution of the base program. The compiler may employ
an abstract syntax tree to switch between an address space of the probe
program and an address space of the base program, by traversing the tree.
Some of the nodes of the tree may more simply represent address
space-specific objects of the base program. The probe program may be able
to pass messages by manipulating the state of the base program.