mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
start plugging in new rdi symbols to dumper
This commit is contained in:
+43
-3
@@ -550,17 +550,18 @@ rdi_dump_list_from_parsed(Arena *arena, RDI_Parsed *rdi, RDI_DumpSubsetFlags fla
|
|||||||
String8List *strings = 0;
|
String8List *strings = 0;
|
||||||
#define dump(str) str8_list_push(arena, strings, (str))
|
#define dump(str) str8_list_push(arena, strings, (str))
|
||||||
#define dumpf(...) str8_list_pushf(arena, strings, __VA_ARGS__)
|
#define dumpf(...) str8_list_pushf(arena, strings, __VA_ARGS__)
|
||||||
#define DumpSubset(name) \
|
#define DumpSubsetKind(kind) \
|
||||||
if(lane_idx() == 0)\
|
if(lane_idx() == 0)\
|
||||||
{\
|
{\
|
||||||
DumpSubsetOutputNode *n = push_array(scratch.arena, DumpSubsetOutputNode, 1);\
|
DumpSubsetOutputNode *n = push_array(scratch.arena, DumpSubsetOutputNode, 1);\
|
||||||
SLLQueuePush(first_output_node, last_output_node, n);\
|
SLLQueuePush(first_output_node, last_output_node, n);\
|
||||||
n->subset = RDI_DumpSubset_##name;\
|
n->subset = (kind);\
|
||||||
n->lane_strings = push_array(scratch.arena, String8List, lane_count());\
|
n->lane_strings = push_array(scratch.arena, String8List, lane_count());\
|
||||||
}\
|
}\
|
||||||
lane_sync();\
|
lane_sync();\
|
||||||
strings = &last_output_node->lane_strings[lane_idx()];\
|
strings = &last_output_node->lane_strings[lane_idx()];\
|
||||||
lane_sync(); if(flags & RDI_DumpSubsetFlag_##name) ProfScope(#name)
|
lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subset_table[kind].str)
|
||||||
|
#define DumpSubset(name) DumpSubsetKind(RDI_DumpSubset_##name)
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump data sections
|
//- rjf: dump data sections
|
||||||
@@ -1103,6 +1104,45 @@ lane_sync(); if(flags & RDI_DumpSubsetFlag_##name) ProfScope(#name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////
|
||||||
|
//- rjf: dump symbols
|
||||||
|
//
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
RDI_DumpSubset subset;
|
||||||
|
RDI_SectionKind section;
|
||||||
|
}
|
||||||
|
symbol_tables[] =
|
||||||
|
{
|
||||||
|
{RDI_DumpSubset_Procedures, RDI_SectionKind_ProcedureSymbols},
|
||||||
|
{RDI_DumpSubset_GlobalVariables, RDI_SectionKind_GlobalVariableSymbols},
|
||||||
|
{RDI_DumpSubset_ThreadVariables, RDI_SectionKind_ThreadVariableSymbols},
|
||||||
|
{RDI_DumpSubset_Constants, RDI_SectionKind_ConstantSymbols},
|
||||||
|
};
|
||||||
|
for EachElement(symbol_table_idx, symbol_tables)
|
||||||
|
{
|
||||||
|
DumpSubsetKind(symbol_tables[symbol_table_idx].subset)
|
||||||
|
{
|
||||||
|
String8 table_name = rdi_name_lowercase_from_dump_subset_table[symbol_tables[symbol_table_idx].subset];
|
||||||
|
RDI_TopLevelInfo *tli = rdi_element_from_name_idx(rdi, TopLevelInfo, 0);
|
||||||
|
U64 count = 0;
|
||||||
|
RDI_Symbol *v = (RDI_Symbol *)rdi_section_raw_table_from_kind(rdi, symbol_tables[symbol_table_idx].section, &count);
|
||||||
|
Rng1U64 range = lane_range(count);
|
||||||
|
for EachInRange(idx, range)
|
||||||
|
{
|
||||||
|
RDI_Symbol *symbol = &v[idx];
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
dumpf("\n '%S': // %S[%I64u]\n {\n", str8_from_rdi_string_idx(rdi, symbol->name_string_idx), table_name, idx);
|
||||||
|
dumpf(" link_name: '%S'\n", str8_from_rdi_string_idx(rdi, symbol->link_name_string_idx));
|
||||||
|
dumpf(" type_idx: %u\n", symbol->type_idx);
|
||||||
|
dumpf(" root_scope_idx: %u\n", symbol->root_scope_idx);
|
||||||
|
dumpf(" container_idx: %u\n", symbol->container_idx);
|
||||||
|
dumpf(" }\n");
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: dump scopes
|
//- rjf: dump scopes
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user