core/sal: move command-line parameter passing to SC::startup()

This commit is contained in:
Horst Schirmeier
2013-03-14 22:29:43 +01:00
parent 422db3e21d
commit eb17e9ef82
9 changed files with 15 additions and 24 deletions

View File

@ -4,7 +4,6 @@
#include "BochsMemory.hpp"
#include "../SALInst.hpp"
#include "../Listener.hpp"
#include "util/CommandLine.hpp"
namespace fail {
@ -174,9 +173,4 @@ ConcreteCPU& BochsController::detectCPU(BX_CPU_C* pCPU) const
return getCPU(i);
}
void BochsController::collectCommandLineArguments(int argc, char **argv) const
{
CommandLine::Inst().collect_args(bx_startup_flags.argc, bx_startup_flags.argv);
}
} // end-of-namespace: fail

View File

@ -150,20 +150,6 @@ public:
* @see The uses SimulatorController::getCPU().
*/
ConcreteCPU& detectCPU(BX_CPU_C* pCPU) const;
protected:
/**
* Hack: Indirection for commandline argument collection
*
* This prevents CommandLine.hpp (and optionparser.h) from being pulled
* inbe to every single Bochs translation unit via FailBochsInit.ah,
* leading to compilation errors in some of them.
* TODO: Move this upwards to SimulatorController?
*
* @param argc main()'s argument counter
* @param argv main()'s argument value vector
*/
void collectCommandLineArguments(int argc, char **argv) const;
};
} // end-of-namespace: fail

View File

@ -10,8 +10,7 @@
aspect FailBochsInit {
advice call("int bxmain()") : before ()
{
fail::simulator.collectCommandLineArguments(bx_startup_flags.argc, bx_startup_flags.argv);
fail::simulator.startup();
fail::simulator.startup(bx_startup_flags.argc, bx_startup_flags.argv);
}
};