1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

UserspaceEmulator: Add ways to check if a Region is stack/mmap

This commit is contained in:
Andreas Kling 2020-07-16 17:04:04 +02:00
parent 9f1221c785
commit 7e13244238
3 changed files with 8 additions and 0 deletions

View file

@ -75,6 +75,7 @@ Emulator::Emulator(const Vector<String>& arguments, NonnullRefPtr<ELF::Loader> e
void Emulator::setup_stack(const Vector<String>& arguments)
{
auto stack_region = make<SimpleRegion>(stack_location, stack_size);
stack_region->set_stack(true);
m_mmu.add_region(move(stack_region));
m_cpu.set_esp(stack_location + stack_size);