gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
PowerISA::StackTrace Class Reference

#include <stacktrace.hh>

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 ()
 

Static Public Attributes

static const int user = 1
 
static const int console = 2
 
static const int unknown = 3
 

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 54 of file stacktrace.hh.

Constructor & Destructor Documentation

◆ StackTrace() [1/2]

PowerISA::StackTrace::StackTrace ( )

Definition at line 65 of file stacktrace.cc.

References panic.

◆ StackTrace() [2/2]

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

Definition at line 71 of file stacktrace.cc.

References panic.

◆ ~StackTrace()

PowerISA::StackTrace::~StackTrace ( )

Definition at line 77 of file stacktrace.cc.

References panic.

Member Function Documentation

◆ clear()

void PowerISA::StackTrace::clear ( )
inline

Definition at line 74 of file stacktrace.hh.

◆ decodePrologue()

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

Definition at line 114 of file stacktrace.cc.

References Stats::dump(), and panic.

◆ decodeSave()

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

Definition at line 103 of file stacktrace.cc.

References panic.

◆ decodeStack()

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

Definition at line 96 of file stacktrace.cc.

References panic.

◆ dprintf()

void PowerISA::StackTrace::dprintf ( )
inline

Definition at line 113 of file stacktrace.hh.

◆ getstack()

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

Definition at line 90 of file stacktrace.hh.

References X86ISA::stack.

◆ isEntry()

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

Definition at line 89 of file stacktrace.cc.

References panic.

◆ trace() [1/2]

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

Definition at line 83 of file stacktrace.cc.

References panic.

◆ trace() [2/2]

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

Definition at line 120 of file stacktrace.hh.

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

◆ valid()

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

Definition at line 81 of file stacktrace.hh.

Member Data Documentation

◆ console

const int PowerISA::StackTrace::console = 2
static

Definition at line 96 of file stacktrace.hh.

◆ stack

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

Definition at line 58 of file stacktrace.hh.

◆ tc

ThreadContext* PowerISA::StackTrace::tc
private

Definition at line 57 of file stacktrace.hh.

◆ unknown

const int PowerISA::StackTrace::unknown = 3
static

Definition at line 97 of file stacktrace.hh.

◆ user

const int PowerISA::StackTrace::user = 1
static

Definition at line 95 of file stacktrace.hh.


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

Generated on Mon Jun 8 2020 15:45:59 for gem5 by doxygen 1.8.13