Add functional PrintReq command for memory-system debugging.

--HG--
extra : convert_revision : 73b753e57c355b7e6873f047ddc8cb371c3136b7
This commit is contained in:
Steve Reinhardt
2008-01-02 12:20:15 -08:00
parent 659aef3eb8
commit 3952e41ab1
23 changed files with 458 additions and 123 deletions

View File

@@ -264,3 +264,19 @@ SimObject::takeOverFrom(BaseCPU *cpu)
{
panic("Unimplemented!");
}
SimObject *
SimObject::find(const char *name)
{
SimObjectList::const_iterator i = simObjectList.begin();
SimObjectList::const_iterator end = simObjectList.end();
for (; i != end; ++i) {
SimObject *obj = *i;
if (obj->name() == name)
return obj;
}
return NULL;
}

View File

@@ -131,6 +131,13 @@ class SimObject : public Serializable, protected StartupCallback
static void debugObjectBreak(const std::string &objs);
#endif
/**
* Find the SimObject with the given name and return a pointer to
* it. Priarily used for interactive debugging. Argument is
* char* rather than std::string to make it callable from gdb.
*/
static SimObject *find(const char *name);
public:
void recordEvent(const std::string &stat);
};