class documentation

class Stack(object):

View In Hierarchy

Representation of a stack.

See module documentation for more information

A stack is always linked to a context since the state of a stack changes between contexts

The stack linked to a context is directly accessible through the context itself using Context.stack.

Method __eq__ Compares the instance for equality with an object.
Method __hash__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Get a formatted string representing the backtrace.
Method format_as_html This method gets an html formatting string representation for this class instance.
Method frame The current frame of the stack.
Method frames Get the known frames of the stack.
Method next_stack Get the next active stack.
Method prev_stack Get the previous active stack.
Property context Property: The context linked to the stack.
Method _repr_html_ Undocumented
Instance Variable _context Undocumented
Instance Variable _data_source Undocumented
Instance Variable _frames Undocumented
def __eq__(self, other):

Compares the instance for equality with an object.

  • if the object is not a Stack, will return False.
Parameters
other:objectUndocumented
Returns
boolUndocumented
def __hash__(self):

Undocumented

Returns
intUndocumented
def __init__(self, data_source, context):

Undocumented

Parameters
data_source:_DataSourceUndocumented
context:_ContextUndocumented
def __repr__(self):

Undocumented

Returns
strUndocumented
def __str__(self):

Get a formatted string representing the backtrace.

Format

[{level}] {creation transition id} {ossi location}

if the creation transition is None, ??? is printed.

Examples

>>> str(stack)
'[0] #2753249448 - ntoskrnl!KeZeroPages\n[1] #2753249199 - ntoskrnl!MiZeroPhysicalPage\n...'
>>> print(stack)
[0] #2753249448 - ntoskrnl!KeZeroPages
[1] #2753249199 - ntoskrnl!MiZeroPhysicalPage
[2] #2753248836 - ntoskrnl!MiResolveDemandZeroFault
[3] #2753248607 - ntoskrnl!MmAccessFault
[4] #2753248552 - ntoskrnl!KiPageFault
[5] ??? - ntoskrnl!KiSystemCall64+0x15

Information

Returns
strA formatted string representing the backtrace.
Raises
RuntimeErrorif the stack events resource has not been generated.
RuntimeErrorif the OSSI resource is not available.
def format_as_html(self):

This method gets an html formatting string representation for this class instance.

Information

Returns
strString
def frame(self):

The current frame of the stack.

This function is equivalent to next(self.frames()).

Information

Returns
StackFrameUndocumented
Raises
RuntimeErrorif the stack events resource has not been generated.
def frames(self):

Get the known frames of the stack.

The first frame in the list is the most recent one and the last one is the oldest one.

Information

Returns
_Iterator[StackFrame]A generator of StackFrame.
Raises
RuntimeErrorif the stack events resource has not been generated.
def next_stack(self):

Get the next active stack.

See module documentation for more information.

Information

Returns
_Optional[Stack]The next active Stack or None if the current one is last active stack in the trace.
Raises
RuntimeErrorif the stack events resource has not been generated.
def prev_stack(self):

Get the previous active stack.

See module documentation for more information.

Information

Returns
_Optional[Stack]The previous active Stack or None if the current one is the first active stack in the trace.
Raises
RuntimeErrorif the stack events resource has not been generated.
@property
context: _Context =

Property: The context linked to the stack.

Information

Returns
A reven2.trace.Context.
def _repr_html_(self):

Undocumented

Returns
strUndocumented
_context =

Undocumented

_data_source =

Undocumented

_frames: _Optional[_List[StackFrame]] =

Undocumented