gem5  v20.0.0.3
Public Member Functions | Static Public Attributes | Protected Types | Private Member Functions | Private Attributes | List of all members
MipsISA::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 MipsISA::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

◆ MachInst

Definition at line 61 of file stacktrace.hh.

Constructor & Destructor Documentation

◆ StackTrace() [1/2]

StackTrace::StackTrace ( )

Definition at line 91 of file stacktrace.cc.

◆ StackTrace() [2/2]

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

Definition at line 96 of file stacktrace.cc.

References trace().

◆ ~StackTrace()

StackTrace::~StackTrace ( )

Definition at line 102 of file stacktrace.cc.

Member Function Documentation

◆ clear()

void MipsISA::StackTrace::clear ( )
inline

Definition at line 79 of file stacktrace.hh.

◆ decodePrologue()

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

◆ decodeSave()

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

Definition at line 166 of file stacktrace.cc.

Referenced by decodePrologue().

◆ decodeStack()

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

Definition at line 125 of file stacktrace.cc.

Referenced by decodePrologue().

◆ dprintf()

void MipsISA::StackTrace::dprintf ( )
inline

Definition at line 103 of file stacktrace.hh.

◆ getstack()

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

Definition at line 89 of file stacktrace.hh.

References X86ISA::stack.

◆ isEntry()

bool StackTrace::isEntry ( Addr  addr)
private

Definition at line 119 of file stacktrace.cc.

◆ trace() [1/2]

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

Definition at line 107 of file stacktrace.cc.

References stack, tc, and user.

Referenced by StackTrace().

◆ trace() [2/2]

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

Definition at line 108 of file stacktrace.hh.

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

◆ valid()

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

Definition at line 85 of file stacktrace.hh.

Member Data Documentation

◆ console

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

Definition at line 92 of file stacktrace.hh.

◆ stack

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

Definition at line 64 of file stacktrace.hh.

Referenced by trace().

◆ tc

ThreadContext* MipsISA::StackTrace::tc
private

Definition at line 63 of file stacktrace.hh.

Referenced by decodePrologue(), and trace().

◆ unknown

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

Definition at line 93 of file stacktrace.hh.

◆ user

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

Definition at line 91 of file stacktrace.hh.

Referenced by trace().


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

Generated on Fri Jul 3 2020 15:53:51 for gem5 by doxygen 1.8.13