From 03abff77e4a0c116f816443434b1864fa8ee12ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 8 Mar 2011 08:15:55 +0100 Subject: Implement process_info(Pid, current_{location,stacktrace}) --- erts/doc/src/erlang.xml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b7d775541f..b59fda7ef7 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3809,11 +3809,26 @@ os_prompt% catches in this process. This InfoTuple may be changed or removed without prior notice.

- {current_function, {Module, Function, Args}} + {current_function, {Module, Function, Arity}} -

Module, Function, Args is +

Module, Function, Arity is the current function call of the process.

+ {current_location, {Module, Function, Arity, Location}} + +

Module, Function, Arity is + the current function call of the process. + Location is a list of two-tuples that describes the + location in the source code. +

+
+ {current_stacktrace, Stack} + +

Return the current call stack back-trace (stacktrace) + of the process. The stack has the same format as returned by + erlang:get_stacktrace/0. +

+
{dictionary, Dictionary}

Dictionary is the dictionary of the process.

-- cgit v1.2.3 From 581a6659f9d67fb0da5399e50ce49070e4becebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 24 Feb 2011 16:18:24 +0100 Subject: erl: Add +L to suppress loading of line number information --- erts/doc/src/erl.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 02082e57c6..8502ceadd2 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -587,6 +587,13 @@

Enables auto load tracing, displaying info while loading code.

+ + +

Don't load information about source filenames and line numbers. + This will save some memory, but exceptions will not contain + information about the filenames and line numbers. +

+

Memory allocator specific flags, see -- cgit v1.2.3 From 8799bbf2c0f644008828fb1000b72fafb3fa58ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 3 Mar 2011 13:02:50 +0100 Subject: Update documentation for erlang:raise/3 and erlang:get_stacktrace/0 --- erts/doc/src/erlang.xml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b59fda7ef7..9b560f04c9 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1282,17 +1282,18 @@ b - erlang:get_stacktrace() -> [{Module, Function, Arity | Args}] + erlang:get_stacktrace() -> [{Module, Function, Arity | Args, Location}] Get the call stack back-trace of the last exception Module = Function = atom() Arity = arity() Args = [term()] + Location = [{atom(),term()}]

Get the call stack back-trace (stacktrace) of the last exception in the calling process as a list of - {Module,Function,Arity} tuples. + {Module,Function,Arity,Location} tuples. The Arity field in the first tuple may be the argument list of that function call instead of an arity integer, depending on the exception.

@@ -1302,6 +1303,25 @@ b

The stacktrace is the same data as the catch operator returns, for example:

{'EXIT',{badarg,Stacktrace}} = catch abs(x)

+

Location is a (possibly empty) list of two-tuples that + may indicate the location in the source code of the function. + The first element is an atom that describes the type of + information in the second element. Currently the following + items may occur:

+ + file + +

The second element of the tuple is a string (list of + characters) representing the filename of the source file + of the function.

+
+ line + +

The second element of the tuple is the line number + (an integer greater than zero) in the source file + where the exception occurred or the function was called.

+
+

See also erlang:error/1 and erlang:error/2.

@@ -4095,11 +4115,14 @@ os_prompt% equivalent to erlang:Class(Reason). Reason is any term and Stacktrace is a list as returned from get_stacktrace(), that is a list of - 3-tuples {Module, Function, Arity | Args} where - Module and Function are atoms and the third - element is an integer arity or an argument list. The - stacktrace may also contain {Fun, Args} tuples where + 4-tuples {Module, Function, Arity | Args, + Location} where Module and Function + are atoms and the third element is an integer arity or an + argument list. The stacktrace may also contain {Fun, + Args, Location} tuples where Fun is a local fun and Args is an argument list.

+

The Location element at the end is optional. + Omitting it is equivalent to specifying an empty list.

The stacktrace is used as the exception stacktrace for the calling process; it will be truncated to the current maximum stacktrace depth.

-- cgit v1.2.3