From 2a43b90eadcbce8763c84d2692e89f5e7a1ec150 Mon Sep 17 00:00:00 2001
From: xsipewe The Erlang interpreter provides mechanisms for breakpoints and
- stepwise execution of code. It is mainly intended to be used by
- the Debugger, see Debugger User's Guide and
-
From the shell, it is possible to:
-The following can be done from the shell:
+By attaching to a process executing interpreted code, it
is possible to examine variable bindings and order stepwise
execution. This is done by sending and receiving information
- to/from the process via a third process, called the meta process.
- It is possible to implement your own attached process. See
+ to/from the process through a third process, called the meta
+ process. You can implement your own attached process. See
The interpreter depends on the Kernel, STDLIB and GS - applications, which means modules belonging to any of these - applications are not allowed to be interpreted as it could lead +
The interpreter depends on the Kernel, STDLIB, and + GS applications. This means that modules belonging to any of + these applications are not allowed to be interpreted, as it could lead to a deadlock or emulator crash. This also applies to modules - belonging to the Debugger application itself.
+ belonging to the Debugger application.Breakpoints are specified on a line basis. When a process executing code in an interpreted module reaches a breakpoint, it - will stop. This means that that a breakpoint must be set at an - executable line, that is, a line of code containing an executable + stops. This means that a breakpoint must be set at an + executable line, that is, a code line containing an executable expression.
-A breakpoint have a status, a trigger action and may have a
- condition associated with it. The status is either active
- or inactive. An inactive breakpoint is ignored. When a
- breakpoint is reached, the trigger action specifies if
- the breakpoint should continue to be active (enable), if
- it should become inactive (disable), or if it should be
- removed (delete). A condition is a tuple
-
A breakpoint has the following:
+By default, a breakpoint is active, has trigger action
-
A module may be given by its module name (atom) or by its - file name. If given by its module name, the object code +
A module can be specified by its module name (atom) or + filename.
+ +If specified by its module name, the object code
If given by its file name, the file name may include a path
- and the
If specified by its filename, the filename can include a path
+ and the
The interpreter needs both the source code and the object - code, and the object code must include debug - information. That is, only modules compiled with the option +
The interpreter requires both the source code and the object
+ code. The object code must include debug
+ information, that is, only modules compiled with option
The functions returns
The argument may also be a list of modules/file names, in +
The argument can also be a list of modules or filenames, in
which case the function tries to interpret each module as
- specified above. The function then always returns
As for
As for
Returns the source code file name
Returns the source code filename
Checks if a module is possible to interpret. The module can
- be given by its module name
The function returns
The function returns
Note that the function can return
Checks if a module can be interpreted. The module can be
+ specified by its module name
The function returns
The function returns
No source code is found.
+ It is assumed that the source code and object code are located
+ either in the same directory, or in
No object code is found.
+ It is assumed that the source code and object code are located
+ either in the same directory, or in
The module has not been compiled with option
+
Notice that the function can return
Gets and sets when and how to automatically attach to a +
Gets and sets when and how to attach automatically to a
process executing code in interpreted modules.
When the specified event occurs, the function
-spawn(Module, Name, [Pid | Args]) -+spawn(Module, Name, [Pid | Args]) +
Gets and sets how to save call frames in the stack. Saving call frames makes it possible to inspect the call chain of a process, and is also used to emulate the stack trace if an - error (an exception of class error) occurs.
-Save information about all current calls, + that is, function calls that have not yet returned a value.
+Save information about current calls, but discard previous information when a tail recursive call - is made. This option consumes less memory and may be + is made. This option consumes less memory and can be necessary to use for processes with long lifetimes and many - tail recursive calls. This is the default.
Save no information about currentcalls.
Deletes the breakpoint located at
Deletes the breakpoint at
Creates a breakpoint at the first line of every clause of
- the
Deletes the breakpoints at the first line of every clause of
- the
Deletes all breakpoints, or all breakpoints in
Deletes all breakpoints, or all breakpoints in
Makes the breakpoint at
Makes the breakpoint at
Makes the breakpoint at
Makes the breakpoint at
Sets the conditional test of the breakpoint at
Gets all breakpoints, or all breakpoints in
Gets all breakpoints, or all breakpoints in
Gets information about all processes executing interpreted code.
-Clears information about processes executing interpreted code by removing all information about terminated processes.
@@ -513,13 +531,13 @@ spawn(Module, Name, [Pid | Args])Resume process execution for
Resumes process execution for