diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-07-30 10:47:53 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-07-30 10:47:53 -0400 |
commit | 3711ea7347b02b8e27f5959d453cb8c9a291a753 (patch) | |
tree | 1c03f48fd8b32020d60e34f7518f9f77e48431bf /base/trace.cc | |
parent | 41988a86b56984e19e9ef45991a39c00fdb3f21e (diff) | |
download | gem5-3711ea7347b02b8e27f5959d453cb8c9a291a753.tar.xz |
Move all of the object matching code to a shared file so it can
be more easily re-used. This currently uses some cooked up matching
function that I wrote a while ago, but should probably be changed
to use regular expressions in the future.
add doDebugBreak to control breakpoints on a per SimObject basis
SConscript:
add match
base/stats/events.cc:
base/trace.cc:
Move the object matching code into a separate file so it can be
more easily shared
base/trace.hh:
the object matching code was wrapped up and moved. adapt.
sim/sim_object.cc:
add the doDebugBreak flag that can be set on a per-SimObject
basis. This will be used in the future to control whether or
not debug_break() will actually break for a given object.
provide a function interface that can be called from the debugger.
sim/sim_object.hh:
add the doDebugBreak flag that can be set on a per-SimObject
basis. This will be used in the future to control whether or
not debug_break() will actually break for a given object.
--HG--
extra : convert_revision : 6bf7924de63d41f5ba6b80d579efdf26ba265a8f
Diffstat (limited to 'base/trace.cc')
-rw-r--r-- | base/trace.cc | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/base/trace.cc b/base/trace.cc index d924b9a4b..bc6c9aa7a 100644 --- a/base/trace.cc +++ b/base/trace.cc @@ -51,39 +51,7 @@ FlagVec flags(NumFlags, false); // ostream *dprintf_stream = &cerr; -int dprintf_ignore_size; -vector<string> dprintf_ignore; -vector<vector<string> > ignore_tokens; -vector<int> ignore_size; - -bool -dprintf_ignore_name(const string &name) -{ - vector<string> name_tokens; - tokenize(name_tokens, name, '.'); - int ntsize = name_tokens.size(); - - for (int i = 0; i < dprintf_ignore_size; ++i) { - bool match = true; - int jstop = ignore_size[i]; - for (int j = 0; j < jstop; ++j) { - if (j >= ntsize) - break; - - const string &ignore = ignore_tokens[i][j]; - if (ignore != "*" && ignore != name_tokens[j]) { - match = false; - break; - } - } - - if (match == true) - return true; - } - - return false; -} - +ObjectMatch ignore; Log theLog; |