Skip to content

Commit

Permalink
Fix an error in stacktraces.rst (JuliaLang#16115)
Browse files Browse the repository at this point in the history
Function `stacktrace`  returned 4 vectors not 3.
  • Loading branch information
zhmz90 authored and ivarne committed Apr 29, 2016
1 parent e5139a7 commit e7dc4a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/manual/stacktraces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ A call to :func:`backtrace` returns a vector of ``Ptr{Void}``, which may then be
[inlined code from REPL.jl:3] eval_user_input at REPL.jl:62
[inlined code from REPL.jl:92] anonymous at task.jl:63

Notice that the vector returned by :func:`backtrace` had 15 pointers, while the vector returned by :func:`stacktrace` only has 3. This is because, by default, :func:`stacktrace` removes any lower-level C functions from the stack. If you want to include stack frames from C calls, you can do it like this::
Notice that the vector returned by :func:`backtrace` had 15 pointers, while the vector returned by :func:`stacktrace` only has 4. This is because, by default, :func:`stacktrace` removes any lower-level C functions from the stack. If you want to include stack frames from C calls, you can do it like this::

julia> stacktrace(stack, true)
15-element Array{StackFrame,1}:
Expand Down

0 comments on commit e7dc4a4

Please sign in to comment.