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.hh | |
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.hh')
-rw-r--r-- | base/trace.hh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/base/trace.hh b/base/trace.hh index b363bec94..1aadb36cf 100644 --- a/base/trace.hh +++ b/base/trace.hh @@ -32,6 +32,7 @@ #include <vector> #include "base/cprintf.hh" +#include "base/match.hh" #include "sim/host.hh" #include "sim/universe.hh" @@ -137,16 +138,13 @@ namespace Trace { extern Log theLog; - extern int dprintf_ignore_size; - - bool - dprintf_ignore_name(const std::string &name); + extern ObjectMatch ignore; inline void dprintf(const char *format, cp::ArgList &args, Tick cycle, const std::string &name) { - if (!dprintf_ignore_size || name.empty() || !dprintf_ignore_name(name)) + if (name.empty() || !ignore.match(name)) theLog.append(new Trace::PrintfRecord(format, args, cycle, name)); } |