mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 23:08:22 -04:00
creport: Skeleton reading of Code Regions.
This commit is contained in:
parent
fd6fa89122
commit
f189610af8
5 changed files with 92 additions and 1 deletions
24
stratosphere/creport/source/creport_code_info.hpp
Normal file
24
stratosphere/creport/source/creport_code_info.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
#include <switch.h>
|
||||
|
||||
#include "creport_debug_types.hpp"
|
||||
|
||||
struct CodeInfo {
|
||||
char name[0x20];
|
||||
u8 id[0x20];
|
||||
u64 start_address;
|
||||
u64 end_address;
|
||||
};
|
||||
|
||||
class CodeList {
|
||||
private:
|
||||
static const size_t max_code_count = 0x10;
|
||||
u32 code_count;
|
||||
CodeInfo code_infos[max_code_count];
|
||||
public:
|
||||
CodeList() : code_count(0), code_infos({}) { }
|
||||
|
||||
void ReadCodeRegionsFromProcess(Handle debug_handle, u64 pc, u64 lr);
|
||||
private:
|
||||
bool TryFindCodeRegion(Handle debug_handle, u64 guess, u64 *address);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue