gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
X86ISA::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 62 of file stacktrace.hh.

Constructor & Destructor Documentation

X86ISA::StackTrace::StackTrace ( )

Definition at line 120 of file stacktrace.cc.

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

Definition at line 125 of file stacktrace.cc.

References trace().

X86ISA::StackTrace::~StackTrace ( )

Definition at line 131 of file stacktrace.cc.

Member Function Documentation

void X86ISA::StackTrace::clear ( )
inline

Definition at line 81 of file stacktrace.hh.

References stack, and tc.

Referenced by trace().

bool X86ISA::StackTrace::decodePrologue ( Addr  sp,
Addr  callpc,
Addr  func,
int &  size,
Addr ra 
)
private
bool X86ISA::StackTrace::decodeSave ( MachInst  inst,
int &  reg,
int &  disp 
)
private

Definition at line 154 of file stacktrace.cc.

Referenced by decodePrologue().

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

Definition at line 147 of file stacktrace.cc.

Referenced by decodePrologue().

void X86ISA::StackTrace::dprintf ( )
inline

Definition at line 105 of file stacktrace.hh.

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

Definition at line 91 of file stacktrace.hh.

References stack.

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

Definition at line 141 of file stacktrace.cc.

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

Definition at line 136 of file stacktrace.cc.

Referenced by StackTrace(), and trace().

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

Definition at line 110 of file stacktrace.hh.

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

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

Definition at line 87 of file stacktrace.hh.

References tc.

Referenced by trace().

Member Data Documentation

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

Definition at line 94 of file stacktrace.hh.

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

Definition at line 66 of file stacktrace.hh.

Referenced by clear(), and getstack().

ThreadContext* X86ISA::StackTrace::tc
private

Definition at line 65 of file stacktrace.hh.

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

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

Definition at line 95 of file stacktrace.hh.

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

Definition at line 93 of file stacktrace.hh.


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

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