mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
fix dumper for new symbols/locations format; produce dummy global unit for global stream pdb info - avoid stomping on 0 unit; fix stomping of location info, from missing lane sync
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: post-0.9.25 TODO notes
|
//~ rjf: post-0.9.25 TODO notes
|
||||||
//
|
//
|
||||||
|
// [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception!
|
||||||
|
//
|
||||||
//- evaluation space coverage pass
|
//- evaluation space coverage pass
|
||||||
// [ ] eval space reads/writes -> needs staleness/badness info - replace ctrl layer, to apply to all spaces
|
// [ ] eval space reads/writes -> needs staleness/badness info - replace ctrl layer, to apply to all spaces
|
||||||
// [ ] need concrete ways of referring into a space at any offset - e.g. `process.memory + 0x1234`, `file:"foo".data + 0x1234`, `thread.regs + 0x80`, etc.
|
// [ ] need concrete ways of referring into a space at any offset - e.g. `process.memory + 0x1234`, `file:"foo".data + 0x1234`, `thread.regs + 0x80`, etc.
|
||||||
@@ -21,7 +23,10 @@
|
|||||||
// [ ] broadly, view discoverability / docs
|
// [ ] broadly, view discoverability / docs
|
||||||
// [ ] signify empty watch window "expression" slot more as a text field?
|
// [ ] signify empty watch window "expression" slot more as a text field?
|
||||||
//
|
//
|
||||||
//- jeff viz notes
|
//- jeff notes
|
||||||
|
// [ ] option to prefer addresses first with string ptrs
|
||||||
|
// [ ] focus changing on f10/f11? may be related to auto_run/auto_step - look at a bin/jeffr
|
||||||
|
// [ ] option to turn off transient tabs altogether
|
||||||
// [ ] single-line viz for pointers w/ bad (unmapped) addresses
|
// [ ] single-line viz for pointers w/ bad (unmapped) addresses
|
||||||
//
|
//
|
||||||
//- namespace/locations/variables RDI pass
|
//- namespace/locations/variables RDI pass
|
||||||
|
|||||||
+24
-1
@@ -753,6 +753,10 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
dumpf(" build_path: %u\n", unit->build_path_node);
|
dumpf(" build_path: %u\n", unit->build_path_node);
|
||||||
dumpf(" language: %S\n", rdi_string_from_language(scratch.arena, unit->language));
|
dumpf(" language: %S\n", rdi_string_from_language(scratch.arena, unit->language));
|
||||||
dumpf(" line_table_idx: %u\n", unit->line_table_idx);
|
dumpf(" line_table_idx: %u\n", unit->line_table_idx);
|
||||||
|
dumpf(" procedures_idx_range: [%u, %u)\n", unit->procedures_first_idx, unit->procedures_first_idx + unit->procedures_count);
|
||||||
|
dumpf(" global_variables_idx_range: [%u, %u)\n", unit->global_variables_first_idx, unit->global_variables_first_idx + unit->global_variables_count);
|
||||||
|
dumpf(" thread_variables_idx_range: [%u, %u)\n", unit->thread_variables_first_idx, unit->thread_variables_first_idx + unit->thread_variables_count);
|
||||||
|
dumpf(" constants_idx_range: [%u, %u)\n", unit->constants_first_idx, unit->constants_first_idx + unit->constants_count);
|
||||||
dumpf(" }\n");
|
dumpf(" }\n");
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
@@ -996,6 +1000,7 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump global variables
|
//- rjf: dump global variables
|
||||||
//
|
//
|
||||||
|
#if 0 // TODO(rjf): @locpass
|
||||||
DumpSubset(GlobalVariables)
|
DumpSubset(GlobalVariables)
|
||||||
{
|
{
|
||||||
U64 count = 0;
|
U64 count = 0;
|
||||||
@@ -1014,6 +1019,7 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump global variables vmap
|
//- rjf: dump global variables vmap
|
||||||
@@ -1033,6 +1039,7 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump thread variables
|
//- rjf: dump thread variables
|
||||||
//
|
//
|
||||||
|
#if 0 // TODO(rjf): @locpass
|
||||||
DumpSubset(ThreadVariables)
|
DumpSubset(ThreadVariables)
|
||||||
{
|
{
|
||||||
U64 count = 0;
|
U64 count = 0;
|
||||||
@@ -1051,10 +1058,12 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump constants
|
//- rjf: dump constants
|
||||||
//
|
//
|
||||||
|
#if 0 // TODO(rjf): @locpass
|
||||||
DumpSubset(Constants)
|
DumpSubset(Constants)
|
||||||
{
|
{
|
||||||
U64 count = 0;
|
U64 count = 0;
|
||||||
@@ -1068,10 +1077,12 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
dumpf(" }\n");
|
dumpf(" }\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump procedures
|
//- rjf: dump procedures
|
||||||
//
|
//
|
||||||
|
#if 0 // TODO(rjf): @locpass
|
||||||
DumpSubset(Procedures)
|
DumpSubset(Procedures)
|
||||||
{
|
{
|
||||||
RDI_TopLevelInfo *tli = rdi_element_from_name_idx(rdi, TopLevelInfo, 0);
|
RDI_TopLevelInfo *tli = rdi_element_from_name_idx(rdi, TopLevelInfo, 0);
|
||||||
@@ -1103,6 +1114,7 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump symbols
|
//- rjf: dump symbols
|
||||||
@@ -1143,7 +1155,18 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
|
|||||||
{
|
{
|
||||||
dumpf(" root_scope_idx: %u\n", symbol->root_scope_idx);
|
dumpf(" root_scope_idx: %u\n", symbol->root_scope_idx);
|
||||||
}
|
}
|
||||||
dumpf(" container_idx: %u\n", symbol->container_idx);
|
if(symbol->container_idx != 0 && (symbol->container_flags & RDI_ContainerFlag_KindMask) == RDI_ContainerKind_Type)
|
||||||
|
{
|
||||||
|
dumpf(" container_type_idx: %u\n", symbol->container_idx);
|
||||||
|
}
|
||||||
|
if(symbol->container_idx != 0 && (symbol->container_flags & RDI_ContainerFlag_KindMask) == RDI_ContainerKind_Scope)
|
||||||
|
{
|
||||||
|
dumpf(" container_scope_idx: %u\n", symbol->container_idx);
|
||||||
|
}
|
||||||
|
if(symbol->container_idx != 0 && (symbol->container_flags & RDI_ContainerFlag_KindMask) == RDI_ContainerKind_Namespace)
|
||||||
|
{
|
||||||
|
dumpf(" container_namespace_idx: %u\n", symbol->container_idx);
|
||||||
|
}
|
||||||
// TODO(rjf): location info
|
// TODO(rjf): location info
|
||||||
dumpf(" }\n");
|
dumpf(" }\n");
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
|
|||||||
@@ -624,14 +624,14 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
RDIM_Rng1U64ChunkList *unit_ranges = 0;
|
RDIM_Rng1U64ChunkList *unit_ranges = 0;
|
||||||
ProfScope("bucket compilation unit contributions") if(lane_idx() == 0)
|
ProfScope("bucket compilation unit contributions") if(lane_idx() == 0)
|
||||||
{
|
{
|
||||||
unit_ranges = push_array(scratch.arena, RDIM_Rng1U64ChunkList, comp_units->count);
|
unit_ranges = push_array(scratch.arena, RDIM_Rng1U64ChunkList, comp_units->count + 1);
|
||||||
for(U64 idx = 0; idx < comp_unit_contributions->count; idx += 1)
|
for(U64 comp_unit_idx = 0; comp_unit_idx < comp_unit_contributions->count; comp_unit_idx += 1)
|
||||||
{
|
{
|
||||||
PDB_CompUnitContribution *contribution = &comp_unit_contributions->contributions[idx];
|
PDB_CompUnitContribution *contribution = &comp_unit_contributions->contributions[comp_unit_idx];
|
||||||
if(contribution->mod < comp_units->count)
|
if(contribution->mod < comp_units->count)
|
||||||
{
|
{
|
||||||
RDIM_Rng1U64 r = {contribution->voff_first, contribution->voff_opl};
|
RDIM_Rng1U64 r = {contribution->voff_first, contribution->voff_opl};
|
||||||
rdim_rng1u64_chunk_list_push(arena, &unit_ranges[contribution->mod], 256, r);
|
rdim_rng1u64_chunk_list_push(arena, &unit_ranges[contribution->mod + 1], 256, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -833,8 +833,8 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
//- rjf: prep outputs
|
//- rjf: prep outputs
|
||||||
ProfScope("prep outputs") if(lane_idx() == 0)
|
ProfScope("prep outputs") if(lane_idx() == 0)
|
||||||
{
|
{
|
||||||
unit_file_stubs = push_array(scratch.arena, P2R_SrcFileStubArray, comp_units->count);
|
unit_file_stubs = push_array(scratch.arena, P2R_SrcFileStubArray, comp_units->count + 1);
|
||||||
unit_file_paths_hashes = push_array(scratch.arena, U64Array, comp_units->count);
|
unit_file_paths_hashes = push_array(scratch.arena, U64Array, comp_units->count + 1);
|
||||||
}
|
}
|
||||||
lane_sync_u64(&unit_file_stubs, 0);
|
lane_sync_u64(&unit_file_stubs, 0);
|
||||||
lane_sync_u64(&unit_file_paths_hashes, 0);
|
lane_sync_u64(&unit_file_paths_hashes, 0);
|
||||||
@@ -856,19 +856,21 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
{
|
{
|
||||||
//- rjf: take next unit
|
//- rjf: take next unit
|
||||||
U64 unit_idx = ins_atomic_u64_inc_eval(sym_take_counter) - 1;
|
U64 unit_idx = ins_atomic_u64_inc_eval(sym_take_counter) - 1;
|
||||||
if(unit_idx >= comp_units->count)
|
if(unit_idx >= comp_units->count + 1)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- rjf: unpack unit
|
//- rjf: unpack unit
|
||||||
PDB_CompUnit *unit = comp_units->units[unit_idx];
|
CV_SymParsed *sym = all_syms[unit_idx];
|
||||||
CV_SymParsed *sym = all_syms[unit_idx+1];
|
CV_C13Parsed *c13 = all_c13s[unit_idx];
|
||||||
CV_C13Parsed *c13 = all_c13s[unit_idx+1];
|
|
||||||
|
|
||||||
//- rjf: produce obj name/path
|
//- rjf: produce obj name/path
|
||||||
String8 obj_name = unit->obj_name;
|
String8 obj_name = str8_lit("*global*");
|
||||||
|
if(unit_idx > 0)
|
||||||
{
|
{
|
||||||
|
PDB_CompUnit *comp_unit = comp_units->units[unit_idx-1];
|
||||||
|
obj_name = comp_unit->obj_name;
|
||||||
if(str8_match(obj_name, str8_lit("* Linker *"), 0) ||
|
if(str8_match(obj_name, str8_lit("* Linker *"), 0) ||
|
||||||
str8_match(obj_name, str8_lit("Import:"), StringMatchFlag_RightSideSloppy))
|
str8_match(obj_name, str8_lit("Import:"), StringMatchFlag_RightSideSloppy))
|
||||||
{
|
{
|
||||||
@@ -1026,6 +1028,8 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rjf: find all files in this unit's (non-inline) line info
|
// rjf: find all files in this unit's (non-inline) line info
|
||||||
|
if(c13 != 0)
|
||||||
|
{
|
||||||
ProfScope("find all files in this unit's (non-inline) line info")
|
ProfScope("find all files in this unit's (non-inline) line info")
|
||||||
for(CV_C13SubSectionNode *node = c13->first_sub_section;
|
for(CV_C13SubSectionNode *node = c13->first_sub_section;
|
||||||
node != 0;
|
node != 0;
|
||||||
@@ -1081,6 +1085,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//- rjf: merge into array for this unit
|
//- rjf: merge into array for this unit
|
||||||
unit_file_stubs[unit_idx].count = src_file_stub_count;
|
unit_file_stubs[unit_idx].count = src_file_stub_count;
|
||||||
@@ -1186,13 +1191,13 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
all_units_ptr = push_array(scratch.arena, RDIM_UnitChunkList, 1);
|
all_units_ptr = push_array(scratch.arena, RDIM_UnitChunkList, 1);
|
||||||
if(params->subset_flags & RDIM_SubsetFlag_Units)
|
if(params->subset_flags & RDIM_SubsetFlag_Units)
|
||||||
{
|
{
|
||||||
for EachIndex(idx, comp_units->count)
|
for EachIndex(idx, comp_units->count + 1)
|
||||||
{
|
{
|
||||||
rdim_unit_chunk_list_push(arena, all_units_ptr, comp_units->count);
|
rdim_unit_chunk_list_push(arena, all_units_ptr, comp_units->count + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
units_line_tables = push_array(scratch.arena, RDIM_LineTableChunkList, comp_units->count);
|
units_line_tables = push_array(scratch.arena, RDIM_LineTableChunkList, comp_units->count + 1);
|
||||||
units_first_inline_site_line_tables = push_array(scratch.arena, RDIM_LineTable *, comp_units->count);
|
units_first_inline_site_line_tables = push_array(scratch.arena, RDIM_LineTable *, comp_units->count + 1);
|
||||||
}
|
}
|
||||||
lane_sync_u64(&all_units_ptr, 0);
|
lane_sync_u64(&all_units_ptr, 0);
|
||||||
lane_sync_u64(&units_line_tables, 0);
|
lane_sync_u64(&units_line_tables, 0);
|
||||||
@@ -1212,20 +1217,23 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
{
|
{
|
||||||
//- rjf: take next unit
|
//- rjf: take next unit
|
||||||
U64 unit_idx = ins_atomic_u64_inc_eval(sym_take_counter) - 1;
|
U64 unit_idx = ins_atomic_u64_inc_eval(sym_take_counter) - 1;
|
||||||
if(unit_idx >= comp_units->count)
|
if(unit_idx >= units_count)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
RDIM_LineTableChunkList *dst_line_tables = &units_line_tables[unit_idx];
|
RDIM_LineTableChunkList *dst_line_tables = &units_line_tables[unit_idx];
|
||||||
PDB_CompUnit *src_unit = comp_units->units[unit_idx];
|
PDB_CompUnit *src_unit = (unit_idx > 0 ? comp_units->units[unit_idx-1] : 0);
|
||||||
CV_SymParsed *src_unit_sym = all_syms[unit_idx+1];
|
CV_SymParsed *src_unit_sym = all_syms[unit_idx];
|
||||||
CV_C13Parsed *src_unit_c13 = all_c13s[unit_idx+1];
|
CV_C13Parsed *src_unit_c13 = all_c13s[unit_idx];
|
||||||
RDIM_Unit *dst_unit = 0;
|
RDIM_Unit *dst_unit = 0;
|
||||||
if(params->subset_flags & RDIM_SubsetFlag_Units) { dst_unit = &units[unit_idx]; }
|
if(params->subset_flags & RDIM_SubsetFlag_Units) { dst_unit = &units[unit_idx]; }
|
||||||
|
|
||||||
// rjf: extract unit name
|
// rjf: extract unit name
|
||||||
String8 unit_name = src_unit->obj_name;
|
String8 unit_name = {0};
|
||||||
|
if(src_unit != 0)
|
||||||
|
{
|
||||||
|
unit_name = src_unit->obj_name;
|
||||||
if(unit_name.size != 0)
|
if(unit_name.size != 0)
|
||||||
{
|
{
|
||||||
String8 unit_name_past_last_slash = str8_skip_last_slash(unit_name);
|
String8 unit_name_past_last_slash = str8_skip_last_slash(unit_name);
|
||||||
@@ -1234,20 +1242,36 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
unit_name = unit_name_past_last_slash;
|
unit_name = unit_name_past_last_slash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unit_name = str8_lit("*global*");
|
||||||
|
}
|
||||||
|
|
||||||
// rjf: produce obj name/path
|
// rjf: produce obj name/path
|
||||||
String8 obj_name = src_unit->obj_name;
|
String8 obj_name = {0};
|
||||||
|
if(src_unit != 0)
|
||||||
|
{
|
||||||
|
obj_name = src_unit->obj_name;
|
||||||
if(str8_match(obj_name, str8_lit("* Linker *"), 0) ||
|
if(str8_match(obj_name, str8_lit("* Linker *"), 0) ||
|
||||||
str8_match(obj_name, str8_lit("Import:"), StringMatchFlag_RightSideSloppy))
|
str8_match(obj_name, str8_lit("Import:"), StringMatchFlag_RightSideSloppy))
|
||||||
{
|
{
|
||||||
MemoryZeroStruct(&obj_name);
|
MemoryZeroStruct(&obj_name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
String8 obj_folder_path = backslashed_from_str8(scratch.arena, str8_chop_last_slash(obj_name));
|
String8 obj_folder_path = backslashed_from_str8(scratch.arena, str8_chop_last_slash(obj_name));
|
||||||
|
|
||||||
//- rjf: main unit line table conversion
|
// rjf: extract unit group name
|
||||||
if(params->subset_flags & RDIM_SubsetFlag_LineInfo) ProfScope("main unit line table conversion")
|
String8 group_name = {0};
|
||||||
|
if(src_unit != 0)
|
||||||
{
|
{
|
||||||
|
group_name = src_unit->group_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- rjf: main unit line table conversion
|
||||||
RDIM_LineTable *line_table = 0;
|
RDIM_LineTable *line_table = 0;
|
||||||
|
if(params->subset_flags & RDIM_SubsetFlag_LineInfo && src_unit_c13 != 0) ProfScope("main unit line table conversion")
|
||||||
|
{
|
||||||
for(CV_C13SubSectionNode *node = src_unit_c13->first_sub_section;
|
for(CV_C13SubSectionNode *node = src_unit_c13->first_sub_section;
|
||||||
node != 0;
|
node != 0;
|
||||||
node = node->next)
|
node = node->next)
|
||||||
@@ -1305,19 +1329,19 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// rjf: fill unit
|
//- rjf: fill unit
|
||||||
if(dst_unit != 0)
|
if(dst_unit != 0)
|
||||||
{
|
{
|
||||||
dst_unit->unit_name = unit_name;
|
dst_unit->unit_name = unit_name;
|
||||||
dst_unit->compiler_name = src_unit_sym->info.compiler_name;
|
dst_unit->compiler_name = src_unit_sym->info.compiler_name;
|
||||||
dst_unit->object_file = obj_name;
|
dst_unit->object_file = obj_name;
|
||||||
dst_unit->archive_file = src_unit->group_name;
|
dst_unit->archive_file = group_name;
|
||||||
dst_unit->language = p2r_rdi_language_from_cv_language(src_unit_sym->info.language);
|
dst_unit->language = p2r_rdi_language_from_cv_language(src_unit_sym->info.language);
|
||||||
dst_unit->line_table = line_table;
|
dst_unit->line_table = line_table;
|
||||||
dst_unit->voff_ranges = unit_ranges[unit_idx];
|
dst_unit->voff_ranges = unit_ranges[unit_idx];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: build per-inline-site line tables
|
//- rjf: build per-inline-site line tables
|
||||||
if(params->subset_flags & RDIM_SubsetFlag_InlineLineInfo) ProfScope("build per-inline-site line tables")
|
if(params->subset_flags & RDIM_SubsetFlag_InlineLineInfo) ProfScope("build per-inline-site line tables")
|
||||||
@@ -1526,7 +1550,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
RDIM_LineTableChunkList *all_line_tables_ptr = &all_line_tables;
|
RDIM_LineTableChunkList *all_line_tables_ptr = &all_line_tables;
|
||||||
ProfScope("join all line tables") if(lane_idx() == 0)
|
ProfScope("join all line tables") if(lane_idx() == 0)
|
||||||
{
|
{
|
||||||
for EachIndex(idx, comp_units->count)
|
for EachIndex(idx, comp_units->count + 1)
|
||||||
{
|
{
|
||||||
rdim_line_table_chunk_list_concat_in_place(&all_line_tables, &units_line_tables[idx]);
|
rdim_line_table_chunk_list_concat_in_place(&all_line_tables, &units_line_tables[idx]);
|
||||||
}
|
}
|
||||||
@@ -3311,7 +3335,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
U64 sym_constants_chunk_cap = 2048;
|
U64 sym_constants_chunk_cap = 2048;
|
||||||
U64 sym_scopes_chunk_cap = 4096;
|
U64 sym_scopes_chunk_cap = 4096;
|
||||||
U64 sym_inline_sites_chunk_cap = 2048;
|
U64 sym_inline_sites_chunk_cap = 2048;
|
||||||
RDIM_Unit *sym_unit = &all_units_ptr->first->v[sym_idx > 0 ? sym_idx-1 : 0];
|
RDIM_Unit *sym_unit = &all_units_ptr->first->v[sym_idx];
|
||||||
RDIM_SymbolChunkList *sym_procedures = &sym_unit->procedures;
|
RDIM_SymbolChunkList *sym_procedures = &sym_unit->procedures;
|
||||||
RDIM_SymbolChunkList *sym_global_variables = &sym_unit->global_variables;
|
RDIM_SymbolChunkList *sym_global_variables = &sym_unit->global_variables;
|
||||||
RDIM_SymbolChunkList *sym_thread_variables = &sym_unit->thread_variables;
|
RDIM_SymbolChunkList *sym_thread_variables = &sym_unit->thread_variables;
|
||||||
@@ -3474,7 +3498,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
|
|
||||||
// rjf: unpack global's container scope
|
// rjf: unpack global's container scope
|
||||||
RDIM_Scope *container_scope = 0;
|
RDIM_Scope *container_scope = 0;
|
||||||
if(container_type == 0 && top_scope_node != 0)
|
if(container_type == 0 && top_scope_node != 0 && iter.kind == CV_SymKind_LDATA32)
|
||||||
{
|
{
|
||||||
container_scope = top_scope_node->scope;
|
container_scope = top_scope_node->scope;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3323,7 +3323,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
//- rjf: @rdim_bake_stage bake units, symbols, types, UDTs
|
//- rjf: @rdim_bake_stage bake units, types, inline sites
|
||||||
//
|
//
|
||||||
RDI_Unit *baked_units = 0;
|
RDI_Unit *baked_units = 0;
|
||||||
U64 baked_units_count = 0;
|
U64 baked_units_count = 0;
|
||||||
@@ -3639,6 +3639,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lane_sync();
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
//- rjf: lay out indirected location data
|
//- rjf: lay out indirected location data
|
||||||
@@ -3777,6 +3778,8 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rjf: fill virtual offset ranges of location set elements
|
// rjf: fill virtual offset ranges of location set elements
|
||||||
|
if(src->location_cases.count > 1)
|
||||||
|
{
|
||||||
U64 loc_set_element_idx = 0;
|
U64 loc_set_element_idx = 0;
|
||||||
for EachNode(c, RDIM_LocationCase, src->location_cases.first)
|
for EachNode(c, RDIM_LocationCase, src->location_cases.first)
|
||||||
{
|
{
|
||||||
@@ -3784,6 +3787,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
dst_loc_set_elements[loc_set_element_idx].voff_opl = c->voff_range.max;
|
dst_loc_set_elements[loc_set_element_idx].voff_opl = c->voff_range.max;
|
||||||
loc_set_element_idx += 1;
|
loc_set_element_idx += 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// rjf: fill location(s)
|
// rjf: fill location(s)
|
||||||
RDI_Location *dst_loc_first = &dst->location;
|
RDI_Location *dst_loc_first = &dst->location;
|
||||||
|
|||||||
Reference in New Issue
Block a user