|
gem5
v19.0.0.0
|
Object used to maintain state of a PrintReq. More...
#include <packet.hh>
Classes | |
| struct | LabelStackEntry |
| An entry in the label stack. More... | |
Public Member Functions | |
| PrintReqState (std::ostream &os, int verbosity=0) | |
| ~PrintReqState () | |
| const std::string & | curPrefix () |
| Returns the current line prefix. More... | |
| void | pushLabel (const std::string &lbl, const std::string &prefix=" ") |
| Push a label onto the label stack, and prepend the given prefix string onto the current prefix. More... | |
| void | popLabel () |
| Pop a label off the label stack. More... | |
| void | printLabels () |
| Print all of the pending unprinted labels on the stack. More... | |
| void | printObj (Printable *obj) |
| Print a Printable object to os, because it matched the address on a PrintReq. More... | |
Public Member Functions inherited from Packet::SenderState | |
| SenderState () | |
| virtual | ~SenderState () |
Public Attributes | |
| std::ostream & | os |
| const int | verbosity |
Public Attributes inherited from Packet::SenderState | |
| SenderState * | predecessor |
Private Types | |
| typedef std::list< LabelStackEntry > | LabelStack |
Private Attributes | |
| LabelStack | labelStack |
| std::string * | curPrefixPtr |
Object used to maintain state of a PrintReq.
The senderState field of a PrintReq should always be of this type.
|
private |
| Packet::PrintReqState::PrintReqState | ( | std::ostream & | os, |
| int | verbosity = 0 |
||
| ) |
Definition at line 422 of file packet.cc.
References curPrefixPtr, and labelStack.
| Packet::PrintReqState::~PrintReqState | ( | ) |
Definition at line 428 of file packet.cc.
References curPrefixPtr, labelStack, and Packet::PrintReqState::LabelStackEntry::LabelStackEntry().
|
inline |
Returns the current line prefix.
Definition at line 443 of file packet.hh.
Referenced by AbstractMemory::functionalAccess(), and printObj().
| void Packet::PrintReqState::popLabel | ( | ) |
Pop a label off the label stack.
Definition at line 452 of file packet.cc.
References curPrefixPtr, and labelStack.
| void Packet::PrintReqState::printLabels | ( | ) |
Print all of the pending unprinted labels on the stack.
Called by printObj(), so normally not called by users unless bypassing printObj().
Definition at line 461 of file packet.cc.
References ccprintf(), ArmISA::i, labelStack, and os.
Referenced by AbstractMemory::functionalAccess(), and printObj().
| void Packet::PrintReqState::printObj | ( | Printable * | obj | ) |
Print a Printable object to os, because it matched the address on a PrintReq.
Definition at line 478 of file packet.cc.
References curPrefix(), os, Printable::print(), printLabels(), and verbosity.
| void Packet::PrintReqState::pushLabel | ( | const std::string & | lbl, |
| const std::string & | prefix = " " |
||
| ) |
Push a label onto the label stack, and prepend the given prefix string onto the current prefix.
Labels will only be printed if an object within the label's scope is printed.
Definition at line 443 of file packet.cc.
References curPrefixPtr, labelStack, Packet::PrintReqState::LabelStackEntry::LabelStackEntry(), and Packet::PrintReqState::LabelStackEntry::prefix.
|
private |
Definition at line 431 of file packet.hh.
Referenced by popLabel(), PrintReqState(), pushLabel(), and ~PrintReqState().
|
private |
Definition at line 429 of file packet.hh.
Referenced by popLabel(), printLabels(), PrintReqState(), pushLabel(), and ~PrintReqState().
| std::ostream& Packet::PrintReqState::os |
Definition at line 434 of file packet.hh.
Referenced by AbstractMemory::functionalAccess(), printLabels(), and printObj().
| const int Packet::PrintReqState::verbosity |
Definition at line 435 of file packet.hh.
Referenced by printObj().