Go to the documentation of this file.
45 #include "debug/FmtFlag.hh"
46 #include "debug/FmtStackTrace.hh"
47 #include "debug/FmtTicksOff.hh"
52 static const std::string default_name(
"global");
86 warn(
"Trying to set debug logger to NULL\n");
108 const void *
d,
int len,
const std::string &flag)
113 const char *
data =
static_cast<const char *
>(
d);
116 for (
i = 0;
i <
len;
i += 16) {
117 std::ostringstream line;
123 for (
j = 0;
j <
c;
j++) {
125 if ((
j & 0xf) == 7 &&
j > 0)
133 for (
j = 0;
j <
c;
j++) {
134 int ch =
data[
i +
j] & 0x7f;
135 ccprintf(line,
"%c", (
char)(isprint(ch) ? ch :
' '));
148 const std::string &flag,
const std::string &message)
156 if (
DTRACE(FmtFlag) && !flag.empty())
165 if (
DTRACE(FmtStackTrace)) {
bool match(const std::string &name) const
uint64_t Tick
Tick count type.
Logger * getDebugLogger()
Get the current global debug logger.
virtual std::ostream & getOstream()=0
Return an ostream that can be used to send messages to the 'same place' as formatted logMessage messa...
void setDebugLogger(Logger *logger)
Delete the current global logger and assign a new one.
void dump(Tick when, const std::string &name, const void *d, int len, const std::string &flag)
Dump a block of data of length len.
void enable()
Enable/disable debug logging.
#define STATIC_ERR(m)
Statically allocate a string and write it to STDERR.
Debug logging base class.
void logMessage(Tick when, const std::string &name, const std::string &flag, const std::string &message) override
Log formatted message.
Logging wrapper for ostreams with the format: <when>: <name>: <message-body>
virtual void logMessage(Tick when, const std::string &name, const std::string &flag, const std::string &message)=0
Log formatted message.
static void globalEnable()
std::ostream & output()
Get the ostream from the current global logger.
static void globalDisable()
const std::string & name()
ObjectMatch ignore
Name match for objects to ignore.
void ccprintf(cp::Print &print)
ObjectMatch contains a vector of expressions.
void print_backtrace()
Print a gem5 post-mortem report.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17