/usr/local/lib/swipl/library/prolog_stack.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl
      • lists.pl
      • broadcast.pl
      • shlib.pl
      • option.pl
      • thread_pool.pl
      • gensym.pl
      • settings.pl
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl -- Operations on key-value lists
      • prolog_source.pl
      • record.pl
      • quasi_quotations.pl -- Define Quasi Quotation syntax
      • pure_input.pl -- Pure Input from files and streams
      • solution_sequences.pl -- Modify solution sequences
      • ordsets.pl -- Ordered set manipulation
      • random.pl
      • base64.pl -- Base64 encoding and decoding
      • aggregate.pl -- Aggregation operators on backtrackable predicates
      • yall.pl
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl -- Binary associations
      • prolog_format.pl -- Analyse format specifications
      • predicate_options.pl
      • csv.pl
      • pprint.pl -- Pretty Print Prolog terms
      • atom.pl
      • modules.pl
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl -- Analysing and constructing URL
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • utf8.pl
      • dialect.pl
      • system.pl
      • terms.pl
      • date.pl
      • persistency.pl -- Provide persistent dynamic predicates
      • iostream.pl -- Utilities to deal with streams
      • prolog_stack.pl -- Examine the Prolog stack
        • get_prolog_backtrace/2
        • get_prolog_backtrace/3
        • prolog_stack_frame_property/2
        • print_prolog_backtrace/2
        • print_prolog_backtrace/3
        • backtrace/1
        • print_last_choicepoint/0
        • print_last_choicepoint/2
        • stack_guard/1
        • stack_guard/1
      • edinburgh.pl -- Some traditional Edinburgh predicates
      • prolog_clause.pl
      • prolog_breakpoints.pl -- Manage Prolog break-points
      • wfs.pl
      • prolog_code.pl
      • sort.pl
      • dicts.pl
      • dif.pl
      • varnumbers.pl
      • pio.pl
      • backcomp.pl -- Backward compatibility
      • base32.pl
      • charsio.pl
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl
      • heaps.pl
      • rbtrees.pl
      • statistics.pl
      • when.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • prolog_versions.pl -- Demand specific (Prolog) versions
      • help.pl
      • listing.pl -- List programs and pretty print clauses
      • thread.pl -- High level thread primitives
      • nb_set.pl
      • threadutil.pl -- Interactive thread utilities
      • check.pl
      • prolog_codewalk.pl -- Prolog code walker
      • make.pl
      • writef.pl -- Old-style formatted write
      • edit.pl
      • prolog_profile.pl -- Execution profiler
      • optparse.pl
      • macros.pl
      • ctypes.pl -- Character code classification
      • zip.pl
      • tty.pl
      • intercept.pl
      • tables.pl
      • prolog_history.pl -- Per-directory persistent commandline history
      • prolog_config.pl -- Provide configuration information
      • quintus.pl
      • prolog_autoload.pl
      • prolog_jiti.pl
      • shell.pl
      • prolog_coverage.pl
      • hashtable.pl -- Hash tables
      • prolog_trace.pl
      • prolog_wrap.pl -- Wrapping predicates
      • explain.pl
      • exceptions.pl
      • files.pl
      • prolog_debug.pl -- User level debugging tools
      • rwlocks.pl
      • increval.pl
      • strings.pl -- String utilities
      • streams.pl -- Manage Prolog streams
      • portray_text.pl
      • oset.pl
      • prolog_metainference.pl
      • fastrw.pl
 get_prolog_backtrace(+MaxDepth, -Backtrace) is det
 get_prolog_backtrace(+MaxDepth, -Backtrace, +Options) is det
Obtain a backtrace from the current location. The backtrace is a list of frames. Each frame is an opaque term that can be inspected using the predicate prolog_stack_frame_property/2 can be used to extract information from these frames. Most use scenarios will pass the stack to print_prolog_backtrace/2. The following options are provided:
frame(+Frame)
Start at Frame instead of the current frame.
goal_term_depth(+Depth)
If Depth > 0, include a shallow copy of the goal arguments into the stack. Default is set by the Prolog flag backtrace_goal_depth, set to 3 initially, showing the goal and toplevel of any argument.
guard(+Guard)
Do not show stack frames above Guard. See stack_guard/1.
clause_references(+Bool)
Report locations as Clause+PC or as a location term that does not use clause references, allowing the exception to be printed safely in a different context.
Arguments:
Frame- is the frame to start from. See prolog_current_frame/1.
MaxDepth- defines the maximum number of frames returned.
Compatibility
- get_prolog_backtrace/3 used to have the parameters +Frame, +MaxDepth, -Backtrace. A call that matches this signature is mapped to get_prolog_backtrace(MaxDepth, Backtrace, [frame(Frame)]).