mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-10 11:31:37 -07:00
rdi: producer name in top-level-info
This commit is contained in:
@@ -52,7 +52,7 @@ typedef int64_t RDI_S64;
|
||||
|
||||
// \"raddbg\0\0\"
|
||||
#define RDI_MAGIC_CONSTANT 0x0000676264646172
|
||||
#define RDI_ENCODING_VERSION 5
|
||||
#define RDI_ENCODING_VERSION 6
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//~ Format Types & Functions
|
||||
@@ -563,6 +563,7 @@ X(RDI_Arch, arch)\
|
||||
X(RDI_U32, exe_name_string_idx)\
|
||||
X(RDI_U64, exe_hash)\
|
||||
X(RDI_U64, voff_max)\
|
||||
X(RDI_U32, producer_name_string_idx)\
|
||||
|
||||
#define RDI_BinarySectionFlags_XList \
|
||||
X(Read)\
|
||||
@@ -1005,6 +1006,7 @@ RDI_Arch arch;
|
||||
RDI_U32 exe_name_string_idx;
|
||||
RDI_U64 exe_hash;
|
||||
RDI_U64 voff_max;
|
||||
RDI_U32 producer_name_string_idx;
|
||||
};
|
||||
|
||||
typedef struct RDI_BinarySection RDI_BinarySection;
|
||||
|
||||
@@ -1833,6 +1833,7 @@ RDI_PROC void
|
||||
rdim_bake_string_map_loose_push_top_level_info(RDIM_Arena *arena, RDIM_BakeStringMapTopology *top, RDIM_BakeStringMapLoose *map, RDIM_TopLevelInfo *tli)
|
||||
{
|
||||
rdim_bake_string_map_loose_insert(arena, top, map, 1, tli->exe_name);
|
||||
rdim_bake_string_map_loose_insert(arena, top, map, 1, tli->producer_name);
|
||||
}
|
||||
|
||||
RDI_PROC void
|
||||
@@ -2338,10 +2339,11 @@ rdim_bake_top_level_info(RDIM_Arena *arena, RDIM_BakeStringMapTight *strings, RD
|
||||
RDIM_TopLevelInfoBakeResult result = {0};
|
||||
{
|
||||
result.top_level_info = rdim_push_array(arena, RDI_TopLevelInfo, 1);
|
||||
result.top_level_info->arch = src->arch;
|
||||
result.top_level_info->exe_name_string_idx = rdim_bake_idx_from_string(strings, src->exe_name);
|
||||
result.top_level_info->exe_hash = src->exe_hash;
|
||||
result.top_level_info->voff_max = src->voff_max;
|
||||
result.top_level_info->arch = src->arch;
|
||||
result.top_level_info->exe_name_string_idx = rdim_bake_idx_from_string(strings, src->exe_name);
|
||||
result.top_level_info->exe_hash = src->exe_hash;
|
||||
result.top_level_info->voff_max = src->voff_max;
|
||||
result.top_level_info->producer_name_string_idx = rdim_bake_idx_from_string(strings, src->producer_name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ struct RDIM_TopLevelInfo
|
||||
RDIM_String8 exe_name;
|
||||
RDI_U64 exe_hash;
|
||||
RDI_U64 voff_max;
|
||||
RDIM_String8 producer_name;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
@@ -153,9 +153,12 @@ rdi_stringize_top_level_info(Arena *arena, String8List *out, RDI_Parsed *rdi, RD
|
||||
String8 arch_str = rdi_string_from_arch(tli->arch);
|
||||
String8 exe_name = {0};
|
||||
exe_name.str = rdi_string_from_idx(rdi, tli->exe_name_string_idx, &exe_name.size);
|
||||
str8_list_pushf(arena, out, "%.*sarch=%.*s\n", indent_level, rdi_stringize_spaces, str8_varg(arch_str));
|
||||
str8_list_pushf(arena, out, "%.*sexe_name='%.*s'\n", indent_level, rdi_stringize_spaces, str8_varg(exe_name));
|
||||
String8 producer_name = {0};
|
||||
producer_name.str = rdi_string_from_idx(rdi, tli->producer_name_string_idx, &producer_name.size);
|
||||
str8_list_pushf(arena, out, "%.*sarch=%S\n", indent_level, rdi_stringize_spaces, arch_str);
|
||||
str8_list_pushf(arena, out, "%.*sexe_name='%S'\n", indent_level, rdi_stringize_spaces, exe_name);
|
||||
str8_list_pushf(arena, out, "%.*svoff_max=0x%08llx\n", indent_level, rdi_stringize_spaces, tli->voff_max);
|
||||
str8_list_pushf(arena, out, "%.*sproducer_name='%S'\n", indent_level, rdi_stringize_spaces, producer_name);
|
||||
}
|
||||
|
||||
internal void
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"";
|
||||
"// \"raddbg\0\0\"";
|
||||
"#define RDI_MAGIC_CONSTANT 0x0000676264646172";
|
||||
"#define RDI_ENCODING_VERSION 5";
|
||||
"#define RDI_ENCODING_VERSION 6";
|
||||
"";
|
||||
"////////////////////////////////////////////////////////////////";
|
||||
"//~ Format Types & Functions";
|
||||
@@ -441,10 +441,11 @@ RDI_RegCodeX64Table:
|
||||
@table(name type desc)
|
||||
RDI_TopLevelInfoMemberTable:
|
||||
{
|
||||
{arch RDI_Arch ""}
|
||||
{exe_name_string_idx RDI_U32 ""}
|
||||
{exe_hash RDI_U64 ""}
|
||||
{voff_max RDI_U64 ""}
|
||||
{arch RDI_Arch ""}
|
||||
{exe_name_string_idx RDI_U32 ""}
|
||||
{exe_hash RDI_U64 ""}
|
||||
{voff_max RDI_U64 ""}
|
||||
{producer_name_string_idx RDI_U32 ""}
|
||||
}
|
||||
|
||||
@xlist RDI_TopLevelInfo_XList:
|
||||
|
||||
@@ -3346,10 +3346,11 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
||||
//
|
||||
RDIM_TopLevelInfo top_level_info = {0};
|
||||
{
|
||||
top_level_info.arch = arch;
|
||||
top_level_info.exe_name = str8_skip_last_slash(in->input_exe_name);
|
||||
top_level_info.exe_hash = exe_hash;
|
||||
top_level_info.voff_max = exe_voff_max;
|
||||
top_level_info.arch = arch;
|
||||
top_level_info.exe_name = str8_skip_last_slash(in->input_exe_name);
|
||||
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);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user