diff options
author | Nathan Binkert <nate@binkert.org> | 2009-07-06 15:49:47 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-07-06 15:49:47 -0700 |
commit | a7904e2cf341d5452c5622adfcbdcd268d4ab7d1 (patch) | |
tree | 76c744e731c275b393130b869c2c2944807a77af /src/mem/ruby/common/Debug.cc | |
parent | 5b080ae0463c9644eb81bd923e25139dfe787e6e (diff) | |
download | gem5-a7904e2cf341d5452c5622adfcbdcd268d4ab7d1.tar.xz |
ruby: apply some fixes that were overwritten by the recent ruby import.
Diffstat (limited to 'src/mem/ruby/common/Debug.cc')
-rw-r--r-- | src/mem/ruby/common/Debug.cc | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/mem/ruby/common/Debug.cc b/src/mem/ruby/common/Debug.cc index c1a6e16d0..1115152f4 100644 --- a/src/mem/ruby/common/Debug.cc +++ b/src/mem/ruby/common/Debug.cc @@ -45,21 +45,31 @@ extern Debug* g_debug_ptr; std::ostream * debug_cout_ptr; bool Debug::m_protocol_trace = false; - -// component character list -const char DEFINE_COMP_CHAR[] = +struct DebugComponentData { -#undef DEFINE_COMP -#define DEFINE_COMP(component, character, description) character, -#include "Debug.def" + const char *desc; + const char ch; }; -// component description list -const char* DEFINE_COMP_DESCRIPTION[] = +// component character list +DebugComponentData debugComponents[] = { -#undef DEFINE_COMP -#define DEFINE_COMP(component, character, description) description, -#include "Debug.def" + {"System", 's' }, + {"Node", 'N' }, + {"Queue", 'q' }, + {"Event Queue", 'e' }, + {"Network", 'n' }, + {"Sequencer", 'S' }, + {"Tester", 't' }, + {"Generated", 'g' }, + {"SLICC", 'l' }, + {"Network Queues", 'Q' }, + {"Time", 'T' }, + {"Network Internals", 'i' }, + {"Store Buffer", 'b' }, + {"Cache", 'c' }, + {"Predictor", 'p' }, + {"Allocator", 'a' }, }; extern "C" void changeDebugVerbosity(VerbosityLevel vb); @@ -226,7 +236,7 @@ bool Debug::checkFilter(char ch) { for (int i=0; i<NUMBER_OF_COMPS; i++) { // Look at all components to find a character match - if (DEFINE_COMP_CHAR[i] == ch) { + if (debugComponents[i].ch == ch) { // We found a match - return no error return false; // no error } @@ -292,9 +302,9 @@ bool Debug::addFilter(char ch) { for (int i=0; i<NUMBER_OF_COMPS; i++) { // Look at all components to find a character match - if (DEFINE_COMP_CHAR[i] == ch) { + if (debugComponents[i].ch == ch) { // We found a match - update the filter bit mask - cout << " Debug: Adding to filter: '" << ch << "' (" << DEFINE_COMP_DESCRIPTION[i] << ")" << endl; + cout << " Debug: Adding to filter: '" << ch << "' (" << debugComponents[i].desc << ")" << endl; m_filter |= (1 << i); return false; // no error } @@ -320,7 +330,7 @@ void Debug::usageInstructions(void) { cerr << "Debug components: " << endl; for (int i=0; i<NUMBER_OF_COMPS; i++) { - cerr << " " << DEFINE_COMP_CHAR[i] << ": " << DEFINE_COMP_DESCRIPTION[i] << endl; + cerr << " " << debugComponents[i].ch << ": " << debugComponents[i].desc << endl; } } |