From d8502ee46d356830698d7b96b29e4b27906a2d79 Mon Sep 17 00:00:00 2001 From: Andrew Bardsley Date: Thu, 16 Oct 2014 05:49:32 -0400 Subject: config: Add a --without-python option to build process Add the ability to build libgem5 without embedded Python or the ability to configure with Python. This is a prelude to a patch to allow config.ini files to be loaded into libgem5 using only C++ which would make embedding gem5 within other simulation systems easier. This adds a few registration interfaces to things which cross between Python and C++. Namely: stats dumping and SimObject resolving --- src/sim/serialize.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/sim/serialize.cc') diff --git a/src/sim/serialize.cc b/src/sim/serialize.cc index 27bf87254..99426b5a6 100644 --- a/src/sim/serialize.cc +++ b/src/sim/serialize.cc @@ -58,8 +58,6 @@ using namespace std; -extern SimObject *resolveSimObject(const string &); - // // The base implementations use to_number for parsing and '<<' for // displaying, suitable for integer types. @@ -600,8 +598,8 @@ Checkpoint::dir() } -Checkpoint::Checkpoint(const string &cpt_dir) - : db(new IniFile), cptDir(setDir(cpt_dir)) +Checkpoint::Checkpoint(const string &cpt_dir, SimObjectResolver &resolver) + : db(new IniFile), objNameResolver(resolver), cptDir(setDir(cpt_dir)) { string filename = cptDir + "/" + Checkpoint::baseFilename; if (!db->load(filename)) { @@ -630,7 +628,7 @@ Checkpoint::findObj(const string §ion, const string &entry, if (!db->find(section, entry, path)) return false; - value = resolveSimObject(path); + value = objNameResolver.resolveSimObject(path); return true; } -- cgit v1.2.3