gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
AlphaISA::StackTrace Class Reference

#include <stacktrace.hh>

Public Types

enum  { user = 1, console = 2, unknown = 3 }
 

Public Member Functions

 StackTrace ()
 
 StackTrace (ThreadContext *tc, const StaticInstPtr &inst)
 
 ~StackTrace ()
 
void clear ()
 
bool valid () const
 
bool trace (ThreadContext *tc, const StaticInstPtr &inst)
 
const std::vector< Addr > & getstack () const
 
void dprintf ()
 

Private Member Functions

bool isEntry (Addr addr)
 
bool decodePrologue (Addr sp, Addr callpc, Addr func, int &size, Addr &ra)
 
bool decodeSave (MachInst inst, int &reg, int &disp)
 
bool decodeStack (MachInst inst, int &disp)
 
void trace (ThreadContext *tc, bool is_call)
 

Private Attributes

ThreadContexttc
 
std::vector< Addrstack
 

Detailed Description

Definition at line 63 of file stacktrace.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
user 
console 
unknown 

Definition at line 95 of file stacktrace.hh.

Constructor & Destructor Documentation

◆ StackTrace() [1/2]

AlphaISA::StackTrace::StackTrace ( )

Definition at line 121 of file stacktrace.cc.

◆ StackTrace() [2/2]

AlphaISA::StackTrace::StackTrace ( ThreadContext tc,
const StaticInstPtr inst 
)

Definition at line 126 of file stacktrace.cc.

References trace().

◆ ~StackTrace()

AlphaISA::StackTrace::~StackTrace ( )

Definition at line 132 of file stacktrace.cc.

Member Function Documentation

◆ clear()

void AlphaISA::StackTrace::clear ( )
inline

Definition at line 83 of file stacktrace.hh.

◆ decodePrologue()

bool AlphaISA::StackTrace::decodePrologue ( Addr  sp,
Addr  callpc,
Addr  func,
int &  size,
Addr ra 
)
private

◆ decodeSave()

bool AlphaISA::StackTrace::decodeSave ( MachInst  inst,
int &  reg,
int &  disp 
)
private

Definition at line 278 of file stacktrace.cc.

Referenced by decodePrologue().

◆ decodeStack()

bool AlphaISA::StackTrace::decodeStack ( MachInst  inst,
int &  disp 
)
private

Definition at line 237 of file stacktrace.cc.

Referenced by decodePrologue().

◆ dprintf()

void AlphaISA::StackTrace::dprintf ( )
inline

Definition at line 109 of file stacktrace.hh.

◆ getstack()

const std::vector<Addr>& AlphaISA::StackTrace::getstack ( ) const
inline

Definition at line 93 of file stacktrace.hh.

References X86ISA::stack.

◆ isEntry()

bool AlphaISA::StackTrace::isEntry ( Addr  addr)
private

◆ trace() [1/2]

void AlphaISA::StackTrace::trace ( ThreadContext tc,
bool  is_call 
)
private

◆ trace() [2/2]

bool AlphaISA::StackTrace::trace ( ThreadContext tc,
const StaticInstPtr inst 
)
inline

Definition at line 114 of file stacktrace.hh.

References StaticInst::isCall(), and StaticInst::isReturn().

◆ valid()

bool AlphaISA::StackTrace::valid ( ) const
inline

Definition at line 89 of file stacktrace.hh.

Member Data Documentation

◆ stack

std::vector<Addr> AlphaISA::StackTrace::stack
private

Definition at line 67 of file stacktrace.hh.

Referenced by decodePrologue(), and trace().

◆ tc

ThreadContext* AlphaISA::StackTrace::tc
private

Definition at line 66 of file stacktrace.hh.

Referenced by decodePrologue(), isEntry(), and trace().


The documentation for this class was generated from the following files:

Generated on Fri Feb 28 2020 16:27:18 for gem5 by doxygen 1.8.13