-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProcess.h
More file actions
38 lines (25 loc) · 776 Bytes
/
Process.h
File metadata and controls
38 lines (25 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef PROCESS_H_
#define PROCESS_H_
#include <string>
#include <vector>
#include <memory>
#include "MemoryRegion.h"
class Process
{
public:
Process(int pId);
virtual ~Process();
int getProcessId() const {return m_pId;}
const std::vector<MemoryRegion>& memoryRegions() const {return m_regions;}
int memoryRegionCount() const {return m_regions.size();}
std::string getMappingFilePath() const;
std::string getMemoryFilePath() const;
std::unique_ptr<uint8_t []> readMemory(uintptr_t offset, size_t len) const;
bool isLibraryLoaded(const std::string& partialName) const;
std::vector<MemoryRegion> getLibraryRegions(const std::string& partialName) const;
protected:
void loadMemoryRegions();
int m_pId = 0;
std::vector<MemoryRegion> m_regions;
};
#endif