AuroraRuntime/Include/Aurora/Process/ProcessMap.hpp

52 lines
995 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ProcessMap.hpp
2021-06-27 21:25:29 +00:00
Date: 2021-6-10
Author: Reece
***/
#pragma once
namespace Aurora::Process
{
struct PublicModule;
struct ModuleMeta
{
AuString moduleName;
AuString modulePath;
AuUInt moduleBase;
AuUInt origVa;
};
struct PageTable
{
bool NX;
bool writable;
bool readable;
bool acSanity;
};
2021-06-27 21:25:29 +00:00
struct Segment
{
AuUInt baseVa;
AuUInt origVa;
AuUInt fsOff;
2021-06-27 21:25:29 +00:00
AuUInt size;
PageTable pt;
AuString name;
AuWPtr<PublicModule> moduleMeta;
2021-06-27 21:25:29 +00:00
};
2021-06-27 21:25:29 +00:00
using Segments = AuList<Segment>;
struct PublicModule
{
AuList<Segment> segments;
AuSPtr<ModuleMeta> moduleMeta;
};
2021-09-06 10:58:08 +00:00
AUKN_SYM AuOptional<Segment> GetSegment(AuUInt pointer);
AUKN_SYM PublicModule DumpExecutableRoot();
2021-06-27 21:25:29 +00:00
AUKN_SYM Segments DumpExecutableAll();
}