33 #include <sys/types.h>
55 kill(getpid(), SIGTRAP);
57 cprintf(
"Debug::breakpoint suppressed, compiled with NDEBUG\n");
72 bool SimpleFlag::_active =
false;
77 FlagsMap::iterator
i =
allFlags().find(name);
83 Flag::Flag(
const char *
name,
const char *desc)
84 : _name(name), _desc(desc)
87 allFlags().insert(make_pair(name,
this));
90 panic(
"Flag %s already defined!", name);
133 :
Flag(
"All",
"All Flags")
139 FlagsMap::iterator
i =
allFlags().begin();
140 FlagsMap::iterator end =
allFlags().end();
141 for (; i != end; ++
i)
142 if (i->second !=
this)
149 FlagsMap::iterator
i =
allFlags().begin();
150 FlagsMap::iterator end =
allFlags().end();
151 for (; i != end; ++
i)
152 if (i->second !=
this)
153 i->second->disable();
193 using namespace Debug;
194 FlagsMap::iterator
i =
allFlags().begin();
195 FlagsMap::iterator end =
allFlags().end();
196 for (;
i != end; ++
i) {
const std::string & name()
std::map< std::string, Flag * > FlagsMap
bool changeFlag(const char *s, bool value)
Flag * findFlag(const std::string &name)
void setDebugFlag(const char *string)
std::vector< Flag * > _kids
void clearDebugFlag(const char *string)
void cprintf(const char *format, const Args &...args)