diff options
Diffstat (limited to 'src/sim/sim_object.cc')
-rw-r--r-- | src/sim/sim_object.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc index 907f015dc..a835aee5b 100644 --- a/src/sim/sim_object.cc +++ b/src/sim/sim_object.cc @@ -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; +} |