View Source edb_server_break (edb v0.3.0)

Summary

Types

breakpoints/0

-opaque breakpoints()

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_steps_on_stack_frames(Pid, StackTail, Breakpoints0)

-spec add_steps_on_stack_frames(pid(), [edb:stack_frame()], breakpoints()) ->
                                   {ok, breakpoints()} | {error, Error}
                                   when Error :: no_abstract_code | {beam_analysis, term()}.

clear_explicit(Module, Line, Breakpoints0)

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

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.

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().