package rdbg

  1. Overview
  2. Docs
val run : ?call_hooks:bool -> unit -> RdbgEvent.t

main:Launches the debuggees, calls hooks (by default), and returns the first event

Moving forwards

val next : RdbgEvent.t -> RdbgEvent.t

move:Computes the next event, calls the hooks functions on it, and returns that event

val next_np : RdbgEvent.t -> RdbgEvent.t

move:as next, without printing the current event

val nexti : RdbgEvent.t -> int -> RdbgEvent.t

move:Returns the ith next event

val nexti_np : RdbgEvent.t -> int -> RdbgEvent.t

move:Returns the ith next event without printing events

val step : RdbgEvent.t -> RdbgEvent.t

move:Goes to the next simulation step of the current node

val stepi : RdbgEvent.t -> int -> RdbgEvent.t

move:Goes to the ith simulation step of the current node

val next_cond : RdbgEvent.t -> (RdbgEvent.t -> bool) -> RdbgEvent.t

move:Returns the next event that satisfies a condition

type ckptl = RdbgEvent.t list
val next_cond_gen : RdbgEvent.t -> (RdbgEvent.t -> bool) -> (RdbgEvent.t -> RdbgEvent.t) -> RdbgEvent.t
val next_match : RdbgEvent.t -> string -> RdbgEvent.t

move:Returns the next event s.t. the string arg is a substring of the event name

val previous_match : RdbgEvent.t -> string -> RdbgEvent.t

move:Returns the previous event s.t. the string arg is a substring of the event name

val loopforever : RdbgEvent.t -> unit

move:Loops forever

Moving backwards

val time_travel : bool -> unit

misc:Turns on/on the possibility to run backwards

val back : RdbgEvent.t -> RdbgEvent.t

move:Moves one event backwards

val backi : RdbgEvent.t -> int -> RdbgEvent.t

move:Moves i events backwards

val prev : RdbgEvent.t -> RdbgEvent.t

move:Moves one step backwards

val previ : RdbgEvent.t -> int -> RdbgEvent.t

move:Moves i steps backwards

val rev_cond : RdbgEvent.t -> (RdbgEvent.t -> bool) -> RdbgEvent.t

move:Returns the previous event satisfying a condition

val rev_cond_gen : RdbgEvent.t -> (RdbgEvent.t -> bool) -> (RdbgEvent.t -> RdbgEvent.t) -> (int -> unit) -> RdbgEvent.t

move:Returns the previous event satisfying a condition p using a custom next.

Since the next function may modify some (external) state, rev_cond_gen is parameterized by the restore_state:int->unit function that is able to restore the external state at its value at event i (the save_state i ought to be done by the caller)

val goto_s : RdbgEvent.t -> int -> RdbgEvent.t

move:Goes to step number i

val goto : RdbgEvent.t -> int -> RdbgEvent.t

move:Goes to event nb i

val ckpt_rate : int Stdlib.ref

Checkpoint rate (that can be changed).

val check_ref : (RdbgEvent.t -> bool) Stdlib.ref

A 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.ref

List 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 -> unit

move:Adds a breakpoint on a node or a file. A breakpoint is a string of the form: "node" "node@line" "file" "file@line"

val breakpoints : string list Stdlib.ref

move:The list of breakpoints

val delete : unit -> unit

move:Removes all breakpoints

val continue : RdbgEvent.t -> RdbgEvent.t

move:continues to the next breakpoint

move:runs backwards until the next breakpoint

val goto_brk : RdbgEvent.t -> string -> RdbgEvent.t

move:Goes to to a specific explicit breakpoint (cf 'break' for breakpoints syntax)

View data

val v : string -> RdbgEvent.t -> Data.v

data:Gets the value of an int variable

val vi : string -> RdbgEvent.t -> int

data:Gets the value of an int variable

val vf : string -> RdbgEvent.t -> float

data:Gets the value of a float variable

val vb : string -> RdbgEvent.t -> bool

data:Gets the value of a boolean variable

val print_src : RdbgEvent.t -> unit

data:Prints some source code information attached to an event

val print_call_stack : RdbgEvent.t -> unit

data:Prints the call stack

Hooks

val add_hook : string -> (RdbgEvent.t -> unit) -> unit

misc: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_hook adds (or replaces) a hook function in the hooks list.

val get_hook : string -> RdbgEvent.t -> unit

misc:Gets a hook function (may raise Not_found)

val del_hook : string -> unit

misc:Removes a hook

val del_all_hooks : unit -> unit

misc:Removes all hooks

val list_hooks : unit -> string list

misc:Lists hooks

Misc

val show_trace : bool Stdlib.ref

Controls the printing of skipped events

val show_data : bool Stdlib.ref

Controls the behavior of print_event

val show_src : bool Stdlib.ref

Controls the behavior of print_event

val string_of_event : RdbgEvent.t -> string

data:Prints an event

val print_event : RdbgEvent.t -> unit