View Source edb_server_break (edb_core v0.4.0)

Summary

Types

breakpoints/0

-opaque breakpoints()

call_stack_addrs/0

-type call_stack_addrs() :: [CodeAddr :: pos_integer()].

call_stack_pattern/0

-type call_stack_pattern() :: [mfa() | (CodeAddr :: pos_integer())].

line/0

-type line() :: edb:line().

vm_breakpoint_reason/0

-type vm_breakpoint_reason() :: explicit | {step, pid()}.

Functions

add_explicit(Module, Line, Breakpoints0)

-spec add_explicit(module(), line(), breakpoints()) ->
                      {ok, breakpoints()} | {error, edb:add_breakpoint_error()}.

add_explicits(Module, Lines, Breakpoints0)

-spec add_explicits(module(), [line()], breakpoints()) -> {LineResults, breakpoints()}
                       when
                           LineResults :: [{line(), Result}],
                           Result :: ok | {error, edb:add_breakpoint_error()}.

clear_explicit(Module, Line, Breakpoints0)

-spec clear_explicit(module(), line(), breakpoints()) ->
                        {ok, removed | vanished, breakpoints()} | {error, not_found}.

clear_explicits(Module, Breakpoints0)

-spec clear_explicits(module(), breakpoints()) -> {ok, breakpoints()}.

create()

-spec create() -> breakpoints().

get_explicit_hit(Pid, Breakpoints)

-spec get_explicit_hit(pid(), breakpoints()) ->
                          {ok, #{module := module(), line := line()}} | no_breakpoint_hit.

get_explicits(Breakpoints)

-spec get_explicits(breakpoints()) -> #{module() => #{line() => []}}.

get_explicits(Module, Breakpoints)

-spec get_explicits(module(), breakpoints()) -> #{line() => []}.

get_explicits_hit(Breakpoints)

-spec get_explicits_hit(breakpoints()) -> #{pid() => #{module := module(), line := line()}}.

is_process_trapped(Pid, Breakpoints)

-spec is_process_trapped(Pid, Breakpoints) -> boolean() when Pid :: pid(), Breakpoints :: breakpoints().

Returns true if the given process is either on an explicit breakpoint or a step breakpoint. Equivalently, returns true if the given process is on a VM breakpoint.

prepare_for_stepping(StepType, Pid, Breakpoints0)

-spec prepare_for_stepping(StepType, Pid, breakpoints()) -> {ok, breakpoints()} | {error, Error}
                              when
                                  StepType :: step_over | step_out,
                                  Pid :: pid(),
                                  Error :: edb:step_error().

prepare_for_stepping_in(Pid, Breakpoints0)

-spec prepare_for_stepping_in(Pid, breakpoints()) -> {ok, breakpoints()} | {error, Error}
                                 when Pid :: pid(), Error :: edb:step_in_error().

register_breakpoint_event(Module, Line, Pid, Resume, Breakpoints)

-spec register_breakpoint_event(Module, Line, Pid, Resume, Breakpoints) ->
                                   {suspend, explicit | step, breakpoints()} | resume
                                   when
                                       Breakpoints :: breakpoints(),
                                       Module :: module(),
                                       Line :: integer(),
                                       Pid :: pid(),
                                       Resume :: fun(() -> ok).

resume_processes(ToResume, Breakpoints)

-spec resume_processes(all | edb_server_sets:set(pid()), breakpoints()) -> breakpoints().