gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | Protected Types | 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
 

Protected Types

typedef TheISA::MachInst MachInst
 

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

Member Typedef Documentation

typedef TheISA::MachInst PowerISA::StackTrace::MachInst
protected

Definition at line 61 of file stacktrace.hh.

Constructor & Destructor Documentation

PowerISA::StackTrace::StackTrace ( )

Definition at line 67 of file stacktrace.cc.

References panic.

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

Definition at line 73 of file stacktrace.cc.

References panic.

PowerISA::StackTrace::~StackTrace ( )

Definition at line 79 of file stacktrace.cc.

References panic.

Member Function Documentation

void PowerISA::StackTrace::clear ( )
inline

Definition at line 80 of file stacktrace.hh.

References stack, and tc.

Referenced by trace().

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

Definition at line 116 of file stacktrace.cc.

References panic.

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

Definition at line 105 of file stacktrace.cc.

References panic.

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

Definition at line 98 of file stacktrace.cc.

References panic.

void PowerISA::StackTrace::dprintf ( )
inline

Definition at line 119 of file stacktrace.hh.

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

Definition at line 96 of file stacktrace.hh.

References stack.

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

Definition at line 91 of file stacktrace.cc.

References panic.

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

Definition at line 85 of file stacktrace.cc.

References panic.

Referenced by trace().

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

Definition at line 126 of file stacktrace.hh.

References clear(), StaticInst::isCall(), StaticInst::isReturn(), trace(), and valid().

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

Definition at line 87 of file stacktrace.hh.

References tc.

Referenced by trace().

Member Data Documentation

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

Definition at line 102 of file stacktrace.hh.

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

Definition at line 64 of file stacktrace.hh.

Referenced by clear(), and getstack().

ThreadContext* PowerISA::StackTrace::tc
private

Definition at line 63 of file stacktrace.hh.

Referenced by clear(), and valid().

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

Definition at line 103 of file stacktrace.hh.

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

Definition at line 101 of file stacktrace.hh.


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

Generated on Fri Jun 9 2017 13:04:35 for gem5 by doxygen 1.8.6