PROLEAD
A Probing-Based Leakage Detection Tool for Hardware and Software
Loading...
Searching...
No Matches
Projects
PROLEAD
inc
Software
mulator
memory_region.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Software/mulator/types.h
"
4
5
namespace
mulator
6
{
7
8
struct
MemoryRegion
9
{
10
u32
offset
;
11
u32
size
;
12
u8
*
bytes
;
13
struct
14
{
15
bool
read
;
16
bool
write
;
17
bool
execute
;
18
}
access
;
19
20
bool
contains
(
u32
address,
u32
len)
const
21
{
22
return
(address >=
offset
) && ((
u64
)(address -
offset
) + len <= (
u64
)
size
);
23
}
24
25
u8
*
get
(
u32
address)
const
26
{
27
return
bytes
+ (address -
offset
);
28
}
29
};
30
31
}
mulator
Definition:
architectures.h:7
mulator::u64
uint64_t u64
Definition:
types.h:13
mulator::u32
uint32_t u32
Definition:
types.h:12
mulator::u8
uint8_t u8
Definition:
types.h:10
mulator::MemoryRegion
Definition:
memory_region.h:9
mulator::MemoryRegion::offset
u32 offset
Definition:
memory_region.h:10
mulator::MemoryRegion::bytes
u8 * bytes
Definition:
memory_region.h:12
mulator::MemoryRegion::size
u32 size
Definition:
memory_region.h:11
mulator::MemoryRegion::access
struct mulator::MemoryRegion::@2 access
mulator::MemoryRegion::get
u8 * get(u32 address) const
Definition:
memory_region.h:25
mulator::MemoryRegion::read
bool read
Definition:
memory_region.h:15
mulator::MemoryRegion::execute
bool execute
Definition:
memory_region.h:17
mulator::MemoryRegion::contains
bool contains(u32 address, u32 len) const
Definition:
memory_region.h:20
mulator::MemoryRegion::write
bool write
Definition:
memory_region.h:16
types.h
Generated by
1.9.6