mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 21:08:40 +00:00
switched to using base Arch enum for converting DWARF registers,
simplified top level building path
This commit is contained in:
@@ -37,6 +37,39 @@ rdim_infer_data_model(OperatingSystem os, RDI_Arch arch)
|
||||
return data_model;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal RDIM_TopLevelInfo
|
||||
rdim_make_top_level_info(String8 image_name, Arch arch, U64 exe_hash, RDIM_BinarySectionList sections)
|
||||
{
|
||||
// convert arch
|
||||
RDI_Arch arch_rdi;
|
||||
switch (arch) {
|
||||
case Arch_Null: arch_rdi = RDI_Arch_NULL; break;
|
||||
case Arch_x64: arch_rdi = RDI_Arch_X64; break;
|
||||
case Arch_x86: arch_rdi = RDI_Arch_X86; break;
|
||||
default: NotImplemented; break;
|
||||
}
|
||||
|
||||
|
||||
// find max VOFF
|
||||
U64 exe_voff_max = 0;
|
||||
for (RDIM_BinarySectionNode *sect_n = sections.first; sect_n != 0 ; sect_n = sect_n->next) {
|
||||
exe_voff_max = Max(exe_voff_max, sect_n->v.voff_opl);
|
||||
}
|
||||
|
||||
|
||||
// fill out top level info
|
||||
RDIM_TopLevelInfo top_level_info = {0};
|
||||
top_level_info.arch = arch_rdi;
|
||||
top_level_info.exe_hash = exe_hash;
|
||||
top_level_info.voff_max = exe_voff_max;
|
||||
top_level_info.producer_name = str8_lit(BUILD_TITLE_STRING_LITERAL);
|
||||
|
||||
|
||||
return top_level_info;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Baking Stage Tasks
|
||||
|
||||
|
||||
@@ -384,6 +384,11 @@ global RDIM_LocalState *rdim_local_state = 0;
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal RDIM_DataModel rdim_infer_data_model(OperatingSystem os, RDI_Arch arch);
|
||||
internal RDIM_TopLevelInfo rdim_make_top_level_info(String8 image_name, Arch arch, U64 exe_hash, RDIM_BinarySectionList sections);
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal RDIM_LocalState * rdim_local_init(void);
|
||||
internal RDIM_BakeResults rdim_bake(RDIM_LocalState *state, RDIM_BakeParams *in);
|
||||
internal RDIM_SerializedSectionBundle rdim_compress(Arena *arena, RDIM_SerializedSectionBundle *in);
|
||||
|
||||
Reference in New Issue
Block a user