mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
UserspaceEmulator: Let SoftCPU.h include Emulator.h
...instead of Emulator.h including SoftCPU.h. This will be used in a later commit to access into Emulator from a template in SoftCPU.h.
This commit is contained in:
parent
23f6a00162
commit
e08cf8f554
3 changed files with 88 additions and 87 deletions
|
@ -10,7 +10,6 @@
|
|||
#include "MallocTracer.h"
|
||||
#include "RangeAllocator.h"
|
||||
#include "Report.h"
|
||||
#include "SoftCPU.h"
|
||||
#include "SoftMMU.h"
|
||||
#include <AK/FileStream.h>
|
||||
#include <AK/Types.h>
|
||||
|
@ -26,6 +25,7 @@
|
|||
namespace UserspaceEmulator {
|
||||
|
||||
class MallocTracer;
|
||||
class SoftCPU;
|
||||
|
||||
class Emulator {
|
||||
public:
|
||||
|
@ -117,7 +117,7 @@ private:
|
|||
const Vector<String> m_environment;
|
||||
|
||||
SoftMMU m_mmu;
|
||||
SoftCPU m_cpu;
|
||||
NonnullOwnPtr<SoftCPU> m_cpu;
|
||||
|
||||
OwnPtr<MallocTracer> m_malloc_tracer;
|
||||
|
||||
|
@ -293,16 +293,4 @@ private:
|
|||
bool m_is_memory_auditing_suppressed { false };
|
||||
};
|
||||
|
||||
ALWAYS_INLINE bool Emulator::is_in_libsystem() const
|
||||
{
|
||||
return m_cpu.base_eip() >= m_libsystem_start && m_cpu.base_eip() < m_libsystem_end;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE bool Emulator::is_in_loader_code() const
|
||||
{
|
||||
if (!m_loader_text_base.has_value() || !m_loader_text_size.has_value())
|
||||
return false;
|
||||
return (m_cpu.base_eip() >= m_loader_text_base.value() && m_cpu.base_eip() < m_loader_text_base.value() + m_loader_text_size.value());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue