mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-10 09:55:42 +00:00
fix program header rebase issue in non-PIE exes, and export program header
info through DEMON event
This commit is contained in:
committed by
Ryan Fleury
parent
7f705923e6
commit
78f2e641bc
@@ -180,3 +180,29 @@ dmn_process_read_cstring(Arena *arena, DMN_Handle process, U64 addr)
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
dmn_process_read_block(Arena *arena, DMN_Handle process, Rng1U64 vrange)
|
||||
{
|
||||
String8 block = {0};
|
||||
void *raw = dmn_process_read_raw(arena, process, vrange);
|
||||
if(raw)
|
||||
{
|
||||
block = str8(raw, dim_1u64(vrange));
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
internal void *
|
||||
dmn_process_read_raw(Arena *arena, DMN_Handle process, Rng1U64 vrange)
|
||||
{
|
||||
Temp temp = temp_begin(arena);
|
||||
void *buffer = push_array(arena, U8, dim_1u64(vrange));
|
||||
U64 read_size = dmn_process_read(process, vrange, buffer);
|
||||
if(read_size != dim_1u64(vrange))
|
||||
{
|
||||
buffer = 0;
|
||||
temp_end(temp);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user