Handle branch fallthrough

This commit is contained in:
Sajid
2024-09-09 22:52:34 +06:00
parent 60edcad576
commit 267e19b854
5 changed files with 71 additions and 27 deletions

View File

@@ -1,18 +1,21 @@
#pragma once
#include <vector>
struct function
struct Function
{
struct block
struct Block
{
size_t base;
size_t size;
size_t base{};
size_t size{};
// scratch
size_t projectedSize{ static_cast<size_t>(-1) };
};
size_t base{};
size_t size{};
std::vector<block> blocks{};
std::vector<Block> blocks{};
size_t SearchBlock(size_t address) const;
static function Analyze(const void* code, size_t size, size_t base);
static Function Analyze(const void* code, size_t size, size_t base);
};