Class DebugStackTraceElement
java.lang.Object
com.oracle.truffle.api.debug.DebugStackTraceElement
Represents a trace element in the guest language stack trace. A guest language trace element
consists of a
name, the current source location
and scopes containing local variables and arguments.
The difference between this class and DebugStackFrame is the limited life-time of
DebugStackFrame, that is associated with a SuspendedEvent.
- Since:
- 19.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionProvides a host element.getName()A description of the trace element.getScope()Get the current inner-most scope.Returns the source section location of this trace element.booleanisHost()Returnstrueif this element is a host element.booleanReturns whether this trace element is a language implementation artifact.
-
Method Details
-
isInternal
public boolean isInternal()Returns whether this trace element is a language implementation artifact.The decision to mark a method as internal is language-specific, reflects judgments about tool usability, and is subject to change.
- Since:
- 19.0
-
isHost
public boolean isHost()Returnstrueif this element is a host element. Host elements providestack trace element, have noscope, and nosource section.Host elements are provided only when
host infois set totrue.- Since:
- 20.3
- See Also:
-
getHostTraceElement
Provides a host element. Returns the host stack trace element if and only if this ishostelement.- Returns:
- the host stack trace element, or
nullwhen not a host element. - Since:
- 20.3
- See Also:
-
getName
A description of the trace element. If the language does not provide such a description thennullis returned.- Since:
- 19.0
-
getSourceSection
Returns the source section location of this trace element. The source section isnullif the source location is not available.- Since:
- 19.0
-
getScope
Get the current inner-most scope. The scope might not provide valid information if the execution path diverges from this trace element.- Returns:
- the scope, or
nullwhen no language is associated with this frame location, or when no local scope exists. - Since:
- 19.0
-