Module RdbgStdLib
val run : ?call_hooks:bool -> unit -> RdbgEvent.tmain:Launches the debuggees, calls hooks (by default), and returns the first event
Moving forwards
val next : RdbgEvent.t -> RdbgEvent.tmove:Computes the next event, calls the hooks functions on it, and returns that event
val next_np : RdbgEvent.t -> RdbgEvent.tmove:as next, without printing the current event
val nexti : RdbgEvent.t -> int -> RdbgEvent.tmove:Returns the ith next event
val nexti_np : RdbgEvent.t -> int -> RdbgEvent.tmove:Returns the ith next event without printing events
val step : RdbgEvent.t -> RdbgEvent.tmove:Goes to the next simulation step of the current node
val stepi : RdbgEvent.t -> int -> RdbgEvent.tmove:Goes to the ith simulation step of the current node
val next_cond : RdbgEvent.t -> (RdbgEvent.t -> bool) -> RdbgEvent.tmove:Returns the next event that satisfies a condition
val next_match : RdbgEvent.t -> string -> RdbgEvent.tmove:Returns the next event s.t. the string arg is a substring of the event name
val previous_match : RdbgEvent.t -> string -> RdbgEvent.tmove:Returns the previous event s.t. the string arg is a substring of the event name
val loopforever : RdbgEvent.t -> unitmove:Loops forever
Moving backwards
val back : RdbgEvent.t -> RdbgEvent.tmove:Moves one event backwards
val backi : RdbgEvent.t -> int -> RdbgEvent.tmove:Moves i events backwards
val rev_cond : RdbgEvent.t -> (RdbgEvent.t -> bool) -> RdbgEvent.tmove:Runs backwards until the next breakpoint or condition
val goto_s : RdbgEvent.t -> int -> RdbgEvent.tmove:Goes to step number i
val goto : RdbgEvent.t -> int -> RdbgEvent.tmove:Goes to event nb i
val check_ref : (RdbgEvent.t -> bool) Stdlib.refA predicate that controls when check-point are done. By default, it is done periodically every !ckpt_rate event.
But of course one can change it (hence the ref)
val ckpt_list : RdbgEvent.t list Stdlib.refList of checkpoints made when !check_ref is true. This list is used and modified by the commands
- rev
- rev_cond
- back/backi
- goto
val goto_last_ckpt : int -> RdbgEvent.t
Breakpoints
val break : string -> unitmove:Adds a breakpoint on a node or a file. A breakpoint is a string of the form: "node" "node@line" "file" "file@line"
val continue : RdbgEvent.t -> RdbgEvent.tmove:continues to the next breakpoint
val rev : RdbgEvent.t -> RdbgEvent.tmove:runs backwards until the next breakpoint
val goto_brk : RdbgEvent.t -> string -> RdbgEvent.tmove:Goes to to a specific explicit breakpoint (cf 'break' for breakpoints syntax)
View data
val v : string -> RdbgEvent.t -> Data.vdata:Gets the value of an int variable
val vi : string -> RdbgEvent.t -> intdata:Gets the value of an int variable
val vf : string -> RdbgEvent.t -> floatdata:Gets the value of a float variable
val vb : string -> RdbgEvent.t -> booldata:Gets the value of a boolean variable
val print_src : RdbgEvent.t -> unitdata:Prints some source code information attached to an event
val print_call_stack : RdbgEvent.t -> unitdata:Prints the call stack
Hooks
val add_hook : string -> (RdbgEvent.t -> unit) -> unitmisc:Hooks are functions that are called each time a new event is obtained with the next function and thus with functions that use next, such as nexti, next_cond, rev_conv, step, stepi, and more).
add_hookadds (or replaces) a hook function in the hooks list.
val get_hook : string -> RdbgEvent.t -> unitmisc:Gets a hook function (may raise
Not_found)
Misc
val print_event : RdbgEvent.t -> unitdata:Prints an event