From c67dcea4a123ad7871040ec991674533953f8c48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
Date: Tue, 8 Mar 2011 11:12:56 +0100
Subject: Update examples in the documentation to include line numbers
---
lib/debugger/doc/src/debugger_chapter.xml | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
(limited to 'lib/debugger/doc')
diff --git a/lib/debugger/doc/src/debugger_chapter.xml b/lib/debugger/doc/src/debugger_chapter.xml
index 1f5d4dd5ff..67e95cd083 100644
--- a/lib/debugger/doc/src/debugger_chapter.xml
+++ b/lib/debugger/doc/src/debugger_chapter.xml
@@ -254,19 +254,17 @@ c_break(Bindings) ->
used, for example, if an error occurs:
In the case above, the stack trace shows that the function called
- last was erl_eval:eval_op/3. See Erlang Reference
- Manual, Errors and Error handling, for more information
- about stack trace.
-
-
Debugger emulates the stack trace by keeping track of recently
+{'EXIT',{badarith,[{erlang,'+',[a,1],[]},
+ {erl_eval,do_apply,5,[{file,"erl_eval.erl"},{line,562}]},
+ {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,359}]},
+ {shell,exprs,7,[{file,"shell.erl"},{line,668}]},
+ {shell,eval_exprs,7,[{file,"shell.erl"},{line,623}]},
+ {shell,eval_loop,3,[{file,"shell.erl"},{line,608}]}]}}
+
+
See the Erlang Reference Manual, Errors and Error handling,
+ for more information about the stack trace.
+
+
The Debugger emulates the stack trace by keeping track of recently
called interpreted functions. (The real stack trace cannot be
used, as it shows which functions of the Debugger have been
called, rather than which interpreted functions).
--
cgit v1.2.3
From 26cceb7a0718182e74083b4ad044985e8f624ee2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
Date: Tue, 16 Aug 2011 08:21:18 +0200
Subject: debugger: By default, only save non-tail-recursive calls
By default, the debugger use to save all calls on its simulated
stack. That could facilitate finding errors, but it could also
mean that the Debugger could become very slow while executing
tail-recursive code.
---
lib/debugger/doc/src/debugger_chapter.xml | 18 ++++++++----------
lib/debugger/doc/src/int.xml | 4 ++--
2 files changed, 10 insertions(+), 12 deletions(-)
(limited to 'lib/debugger/doc')
diff --git a/lib/debugger/doc/src/debugger_chapter.xml b/lib/debugger/doc/src/debugger_chapter.xml
index 67e95cd083..2d812b0236 100644
--- a/lib/debugger/doc/src/debugger_chapter.xml
+++ b/lib/debugger/doc/src/debugger_chapter.xml
@@ -274,17 +274,15 @@ c_break(Bindings) ->
the Attach Process window.
-
By default, the Debugger saves information about all current
+
By default, the Debugger only saves information about recursive
function calls, that is, function calls that have not yet returned
- a value (option 'Stack On, Tail').
-
-
This means, however, that information is saved also for tail
- recursive calls. For example, repeated calls to the loop
- function of an Erlang process. This may consume unnecessary
- amounts of memory for debugged processes with long lifetimes and
- many tail recursive calls. It is therefore possible to set
- the option 'Stack On, no tail', in which case information about
- previous calls are discarded when a tail recursive call is made.
+ a value (option 'Stack On, No Tail').
+
+
Sometimes, however, it can be useful to save all calls, even
+ tail-recursive calls. That can be done with the 'Stack On, Tail'
+ option. Note that this option will consume more memory and slow
+ down execution of interpreted functions when there are many
+ tail-recursive calls.
It is also possible to turn off the Debugger stack trace
diff --git a/lib/debugger/doc/src/int.xml b/lib/debugger/doc/src/int.xml
index 8b55461a44..c9d815755d 100644
--- a/lib/debugger/doc/src/int.xml
+++ b/lib/debugger/doc/src/int.xml
@@ -284,12 +284,12 @@ spawn(Module, Name, [Pid | Args])
all - save information about all current calls,
that is, function calls that have not yet returned a value.
- This is the default.
+
no_tail - save information about current calls,
but discard previous information when a tail recursive call
is made. This option consumes less memory and may be
necessary to use for processes with long lifetimes and many
- tail recursive calls.
+ tail recursive calls. This is the default.
false - do not save any information about current
calls.
--
cgit v1.2.3