gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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
Enumerator
user 
console 
unknown 

Definition at line 95 of file stacktrace.hh.

Constructor & Destructor Documentation

AlphaISA::StackTrace::StackTrace ( )

Definition at line 121 of file stacktrace.cc.

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

Definition at line 126 of file stacktrace.cc.

References trace().

AlphaISA::StackTrace::~StackTrace ( )

Definition at line 132 of file stacktrace.cc.

Member Function Documentation

void AlphaISA::StackTrace::clear ( )
inline

Definition at line 83 of file stacktrace.hh.

References stack, and tc.

Referenced by trace().

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

Definition at line 307 of file stacktrace.cc.

References CopyOut(), decodeSave(), decodeStack(), pc, X86ISA::reg, AlphaISA::ReturnAddressReg, and tc.

Referenced by trace().

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

Definition at line 278 of file stacktrace.cc.

Referenced by decodePrologue().

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

Definition at line 237 of file stacktrace.cc.

Referenced by decodePrologue().

void AlphaISA::StackTrace::dprintf ( )
inline

Definition at line 109 of file stacktrace.hh.

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

Definition at line 93 of file stacktrace.hh.

References stack.

bool AlphaISA::StackTrace::isEntry ( Addr  addr)
private
void AlphaISA::StackTrace::trace ( ThreadContext tc,
bool  is_call 
)
private
bool AlphaISA::StackTrace::trace ( ThreadContext tc,
const StaticInstPtr inst 
)
inline

Definition at line 114 of file stacktrace.hh.

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

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

Definition at line 89 of file stacktrace.hh.

References tc.

Referenced by trace().

Member Data Documentation

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

Definition at line 67 of file stacktrace.hh.

Referenced by clear(), getstack(), and trace().

ThreadContext* AlphaISA::StackTrace::tc
private

Definition at line 66 of file stacktrace.hh.

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


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

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