38 lines
984 B
C++
38 lines
984 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuProcessSectionFileMapView.Unix.hpp
|
|
Date: 2022-08-09
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Process
|
|
{
|
|
struct ProcessSectionView;
|
|
|
|
struct ProcessSectionFileMapView : IProcessSectionMapView
|
|
{
|
|
ProcessSectionFileMapView(AuUInt uAddress, AuUInt uLength, bool bShouldUnmap, int optFd = -1);
|
|
virtual ~ProcessSectionFileMapView();
|
|
|
|
virtual void Unmap() override;
|
|
|
|
virtual bool Flush(AuUInt offset, AuUInt length) override;
|
|
|
|
AuUInt GetBaseAddress() override;
|
|
AuUInt GetAddress(AuUInt offset) override;
|
|
|
|
AuUInt8 *GetBasePointer() override;
|
|
AuUInt8 *GetPointer(AuUInt offset) override;
|
|
|
|
AuSPtr<IProcessSectionView> pSharedSectionHint {};
|
|
|
|
private:
|
|
AuUInt uAddress {};
|
|
AuUInt uLength_ {};
|
|
bool bShouldUnmap_ {};
|
|
int optFd_ {-1};
|
|
bool bIsDead_ {};
|
|
};
|
|
} |