DatabaseExperiment: remove Bochs dependency
Use the newly introduced SimulatorController::getCPUCount() instead of BX_SMP_PROCESSORS to figure out the number of CPUs the back end provides. Change-Id: I6d6521ae508154366ab5d0c23ddcb6f2de99aa04
This commit is contained in:
@ -140,7 +140,7 @@ bool DatabaseExperiment::run()
|
|||||||
|
|
||||||
address_t injection_instr_absolute = fsppilot->injection_instr_absolute();
|
address_t injection_instr_absolute = fsppilot->injection_instr_absolute();
|
||||||
bool found_eip = false;
|
bool found_eip = false;
|
||||||
for (int i = 0; i < BX_SMP_PROCESSORS; i++) {
|
for (size_t i = 0; i < simulator.getCPUCount(); i++) {
|
||||||
address_t eip = simulator.getCPU(i).getInstructionPointer();
|
address_t eip = simulator.getCPU(i).getInstructionPointer();
|
||||||
if (eip == injection_instr_absolute) {
|
if (eip == injection_instr_absolute) {
|
||||||
found_eip = true;
|
found_eip = true;
|
||||||
|
|||||||
@ -152,6 +152,11 @@ public:
|
|||||||
* @return a reference to the requested CPU object
|
* @return a reference to the requested CPU object
|
||||||
*/
|
*/
|
||||||
ConcreteCPU& getCPU(size_t id) const;
|
ConcreteCPU& getCPU(size_t id) const;
|
||||||
|
/**
|
||||||
|
* Get the total number of CPUs.
|
||||||
|
* @return the CPU count
|
||||||
|
*/
|
||||||
|
size_t getCPUCount() const { return m_CPUs.size(); }
|
||||||
/**
|
/**
|
||||||
* Returns the (constant) initialized memory manager.
|
* Returns the (constant) initialized memory manager.
|
||||||
* @return a reference to the memory manager
|
* @return a reference to the memory manager
|
||||||
|
|||||||
Reference in New Issue
Block a user