store partially-qualified names in generated RDIs; adjust debugger to do fully-qualified lookups when appropriate

This commit is contained in:
Ryan Fleury
2026-04-21 19:36:38 -07:00
parent 8cf14b5acb
commit 6f2b8540eb
6 changed files with 498 additions and 240 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ commands =
//- rjf: [raddbg]
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg meta telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
.f1 = { .win = "raddbg_stable --ipc kill_all && build radbin", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
.f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
//- rjf: [raddbg wsl]
// .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
+127 -6
View File
@@ -1531,6 +1531,77 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
key_read_off += str8_deserial_read(key, key_read_off, name.str, name.size, 1);
}
//- rjf: find split point between container part of name & "leaf"
U64 container_part_opl = 0;
U64 leaf_part_first = 0;
for(U64 off = 0; off+1 < name.size; off += 1)
{
if(name.str[off] == '.')
{
container_part_opl = off;
leaf_part_first = off+1;
}
else if(name.str[off] == ':' && name.str[off+1] == ':')
{
container_part_opl = off;
leaf_part_first = off+2;
}
}
//- rjf: unpack container/leaf
String8 container_part_of_name = str8_prefix(name, container_part_opl);
String8 leaf_part_of_name = str8_skip(name, leaf_part_first);
//- rjf: produce the fully qualified name, sanitize the container part (convert all `.`s to `::`s)
String8 fully_qualified_name = name;
if(container_part_of_name.size != 0)
{
// rjf: gather parts of container
String8List parts = {0};
for(U64 off = 0, next_off = 0; off < container_part_of_name.size; off = next_off)
{
// rjf: find the next separator
U64 next_separator_pos = container_part_of_name.size;
U64 next_separator_size = 0;
{
S64 template_nest_depth = 0;
for(U64 off2 = off; off2+1 < container_part_of_name.size; off2 += 1)
{
if(template_nest_depth == 0 && container_part_of_name.str[off2] == '.')
{
next_separator_pos = off2;
next_separator_size = 1;
break;
}
else if(template_nest_depth == 0 && container_part_of_name.str[off2] == ':' && container_part_of_name.str[off2+1] == ':')
{
next_separator_pos = off2;
next_separator_size = 2;
break;
}
else if(container_part_of_name.str[off2] == '<')
{
template_nest_depth += 1;
}
else if(container_part_of_name.str[off2] == '>')
{
template_nest_depth -= 1;
template_nest_depth = ClampBot(0, template_nest_depth);
}
}
}
// rjf: gather portions of container
str8_list_push(scratch.arena, &parts, str8_substr(container_part_of_name, r1u64(off, next_separator_pos)));
next_off = next_separator_pos + next_separator_size;
}
// rjf: add leaf & join
str8_list_push(scratch.arena, &parts, leaf_part_of_name);
StringJoin join = {.sep = str8_lit("::")};
fully_qualified_name = str8_list_join(scratch.arena, &parts, &join);
}
//- rjf: get all loaded keys
DI_KeyArray dbgi_keys = di_push_all_loaded_keys(scratch.arena);
@@ -1577,18 +1648,68 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
for EachElement(name_map_kind_idx, name_map_kinds)
{
// rjf: unpack name map
RDI_NameMap *name_map = rdi_element_from_name_idx(rdi, NameMaps, name_map_kinds[name_map_kind_idx]);
RDI_ParsedNameMap parsed_name_map = {0};
rdi_parsed_from_name_map(rdi, name_map, &parsed_name_map);
RDI_NameMapNode *map_node = rdi_name_map_lookup(rdi, &parsed_name_map, name.str, name.size);
U32 num = 0;
U32 *run = rdi_matches_from_map_node(rdi, map_node, &num);
if(num != 0)
// rjf: find matches for (possibly leaf) name
RDI_NameMapNode *map_node = rdi_name_map_lookup(rdi, &parsed_name_map, leaf_part_of_name.str, leaf_part_of_name.size);
U32 matches_count = 0;
U32 *matches = rdi_matches_from_map_node(rdi, map_node, &matches_count);
// rjf: do we have a container? -> filter matches according to container string also
if(container_part_of_name.size != 0)
{
U64 run_idx = (num-1) - Min(index, num-1);
U32 *filtered_matches = push_array(scratch.arena, U32, matches_count);
U32 filtered_matches_count = 0;
for EachIndex(match_idx, matches_count)
{
Temp scratch = scratch_begin(0, 0);
String8 match_fully_qualified_name = {0};
switch(name_map_section_kinds[name_map_kind_idx])
{
default:{}break;
case RDI_SectionKind_GlobalVariables:
case RDI_SectionKind_ThreadVariables:
case RDI_SectionKind_Constants:
case RDI_SectionKind_Procedures:
{
RDI_Symbol *symbol = (RDI_Symbol *)rdi_section_raw_element_from_kind_idx(rdi, name_map_section_kinds[name_map_kind_idx], matches[match_idx]);
String8 match_fully_qualified_name = fully_qualified_str8_from_rdi_symbol(scratch.arena, rdi, symbol);
if(str8_match(match_fully_qualified_name, fully_qualified_name, 0))
{
filtered_matches[filtered_matches_count] = matches[match_idx];
filtered_matches_count += 1;
}
}break;
case RDI_SectionKind_TypeNodes:
{
RDI_TypeNode *type_node = rdi_element_from_name_idx(rdi, TypeNodes, match_idx);
if(RDI_TypeKind_FirstUserDefined <= type_node->kind && type_node->kind <= RDI_TypeKind_LastUserDefined)
{
String8 match_fully_qualified_name = fully_qualified_str8_from_rdi_type(scratch.arena, rdi, type_node);
if(str8_match(match_fully_qualified_name, fully_qualified_name, 0))
{
filtered_matches[filtered_matches_count] = matches[match_idx];
filtered_matches_count += 1;
}
}
}break;
}
scratch_end(scratch);
}
matches = filtered_matches;
matches_count = filtered_matches_count;
}
// rjf: given matches, pick selected & return as result
if(matches_count != 0)
{
U64 selected_match_idx = (matches_count-1) - Min(index, matches_count-1);
lane_matches[lane_idx()].key = dbgi_key;
lane_matches[lane_idx()].section_kind = name_map_section_kinds[name_map_kind_idx];
lane_matches[lane_idx()].idx = run[run_idx];
lane_matches[lane_idx()].idx = matches[selected_match_idx];
}
}
}
+7
View File
@@ -1887,6 +1887,12 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
// rjf: find match
DI_Match match = di_match_from_string(string, match_disambiguating_idx, e_base_ctx->primary_dbg_info->dbgi_key, 0);
#if 0
//~ TODO(rjf): vvvvv this used to be used for namespaceifying partially-qualified strings.
// now, the debugger just stores partially-qualified strings, so we instead need to do the
// reverse: given a fully-qualified name, try to parse out the leaf, and look up the partial
// qualified name.
if(match.idx == 0)
{
String8List namespaceified_strings = {0};
@@ -1923,6 +1929,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
}
}
}
#endif
// rjf: match -> RDI
RDI_Parsed *rdi = di_rdi_from_key(access, match.key, 0, 0);
+63 -4
View File
@@ -48,6 +48,59 @@ str8_from_rdi_path_node_idx(Arena *arena, RDI_Parsed *rdi, PathStyle path_style,
return path;
}
internal String8
fully_qualified_from_rdi_string_and_container(Arena *arena, RDI_Parsed *rdi, U32 name_string_idx, U32 start_container_idx, RDI_ContainerFlags start_container_flags)
{
Temp scratch = scratch_begin(&arena, 1);
String8List parts = {0};
{
str8_list_push(scratch.arena, &parts, str8_from_rdi_string_idx(rdi, name_string_idx));
RDI_ContainerFlags container_flags = start_container_flags;
RDI_ContainerFlags next_container_flags = 0;
for(U32 container_idx = start_container_idx, next_container_idx = 0;
container_idx != 0;
container_idx = next_container_idx, container_flags = next_container_flags)
{
next_container_idx = 0;
next_container_flags = 0;
switch(container_flags & RDI_ContainerFlag_KindMask)
{
default:{}break;
case RDI_ContainerKind_Type:
{
RDI_UDT *udt = rdi_element_from_name_idx(rdi, UDTs, container_idx);
RDI_TypeNode *type = rdi_element_from_name_idx(rdi, TypeNodes, udt->self_type_idx);
String8 type_name = str8_from_rdi_string_idx(rdi, type->user_defined.name_string_idx);
str8_list_push_front(scratch.arena, &parts, type_name);
next_container_idx = udt->container_idx;
next_container_flags = udt->container_flags;
}break;
case RDI_ContainerKind_Scope:
{
RDI_Scope *scope = rdi_element_from_name_idx(rdi, Scopes, container_idx);
RDI_Symbol *symbol = rdi_procedure_from_scope(rdi, scope);
String8 name = str8_from_rdi_string_idx(rdi, symbol->name_string_idx);
str8_list_push_front(scratch.arena, &parts, name);
next_container_idx = symbol->container_idx;
next_container_flags = symbol->container_flags;
}break;
case RDI_ContainerKind_Namespace:
{
RDI_Namespace *ns = rdi_element_from_name_idx(rdi, Namespaces, container_idx);
String8 name = str8_from_rdi_string_idx(rdi, ns->name_string_idx);
str8_list_push_front(scratch.arena, &parts, name);
next_container_idx = ns->container_idx;
next_container_flags = ns->container_flags;
}break;
}
}
}
StringJoin join = {.sep = str8_lit("::")};
String8 result = str8_list_join(arena, &parts, &join);
scratch_end(scratch);
return result;
}
////////////////////////////////
//~ rjf: String <=> Enum
@@ -795,7 +848,8 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
}
else if(RDI_TypeKind_FirstUserDefined <= type->kind && type->kind <= RDI_TypeKind_LastUserDefined)
{
dumpf(" name: '%S'\n", str8_from_rdi_string_idx(rdi, type->user_defined.name_string_idx));
String8 fully_qualified_name = fully_qualified_str8_from_rdi_type(scratch.arena, rdi, type);
dumpf(" name: '%S'\n", fully_qualified_name);
dumpf(" user_defined__direct_type: %u\n", type->user_defined.direct_type_idx);
dumpf(" user_defined__udt: %u\n", type->user_defined.udt_idx);
}
@@ -825,7 +879,8 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
{
RDI_UDT *udt = &v[idx];
Temp scratch = scratch_begin(&arena, 1);
dumpf("\n // udt[%I64u]\n {\n", idx);
String8 fully_qualified_name = fully_qualified_str8_from_rdi_udt(scratch.arena, rdi, udt);
dumpf("\n // udt[%I64u]\n '%S':\n {\n", idx, fully_qualified_name);
dumpf(" self_type: %u\n", udt->self_type_idx);
dumpf(" flags: `%S`\n", rdi_string_from_udt_flags(scratch.arena, udt->flags));
if(udt->container_idx != 0 && (udt->container_flags & RDI_ContainerFlag_KindMask) == RDI_ContainerKind_Type)
@@ -929,7 +984,8 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
{
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);
String8 fully_qualified_name = fully_qualified_str8_from_rdi_symbol(scratch.arena, rdi, symbol);
dumpf("\n '%S': // %S[%I64u]\n {\n", fully_qualified_name, table_name, idx);
dumpf(" type_idx: %u\n", symbol->type_idx);
if(symbol->link_name_string_idx != 0)
{
@@ -1258,6 +1314,7 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
Rng1U64 range = lane_range(count);
for EachInRange(idx, range)
{
Temp scratch = scratch_begin(&arena, 1);
RDI_Namespace *ns = &v[idx];
String8 container_kind_name = str8_lit("container_idx");
switch(ns->container_flags & RDI_ContainerFlag_KindMask)
@@ -1276,7 +1333,9 @@ lane_sync(); if(flags & (1ull<<(kind))) ProfScope(rdi_name_title_from_dump_subse
container_kind_name = str8_lit("container_scope_idx");
}break;
}
dumpf("\n '%S': {%S: %u} // namespaces[%I64u]", str8_from_rdi_string_idx(rdi, ns->name_string_idx), container_kind_name, ns->container_idx, idx);
String8 fully_qualified_name = fully_qualified_str8_from_rdi_namespace(scratch.arena, rdi, ns);
dumpf("\n '%S': {%S: %u} // namespaces[%I64u]", fully_qualified_name, container_kind_name, ns->container_idx, idx);
scratch_end(scratch);
}
if(lane_idx() == lane_count()-1) { dumpf("\n"); }
}
+6 -1
View File
@@ -75,7 +75,12 @@ internal Arch arch_from_rdi_arch(RDI_Arch arch);
//~ rjf: Lookup Helpers
internal String8 str8_from_rdi_string_idx(RDI_Parsed *rdi, U32 idx);
internal String8 str8_from_rdi_path_node_idx(Arena *arean, RDI_Parsed *rdi, PathStyle path_style, U32 path_node_idx);
internal String8 str8_from_rdi_path_node_idx(Arena *arena, RDI_Parsed *rdi, PathStyle path_style, U32 path_node_idx);
internal String8 fully_qualified_from_rdi_string_and_container(Arena *arena, RDI_Parsed *rdi, U32 name_string_idx, U32 start_container_idx, RDI_ContainerFlags start_container_flags);
#define fully_qualified_str8_from_rdi_symbol(arena, rdi, symbol) fully_qualified_from_rdi_string_and_container((arena), (rdi), (symbol)->name_string_idx, (symbol)->container_idx, (symbol)->container_flags)
#define fully_qualified_str8_from_rdi_udt(arena, rdi, udt) fully_qualified_from_rdi_string_and_container((arena), (rdi), rdi_element_from_name_idx((rdi), TypeNodes, (udt)->self_type_idx)->user_defined.name_string_idx, (udt)->container_idx, (udt)->container_flags)
#define fully_qualified_str8_from_rdi_type(arena, rdi, type) fully_qualified_from_rdi_string_and_container((arena), (rdi), (type)->user_defined.name_string_idx, rdi_element_from_name_idx((rdi), UDTs, (type)->user_defined.udt_idx)->container_idx, rdi_element_from_name_idx((rdi), UDTs, (type)->user_defined.udt_idx)->container_flags)
#define fully_qualified_str8_from_rdi_namespace(arena, rdi, ns) fully_qualified_from_rdi_string_and_container((arena), (rdi), (ns)->name_string_idx, (ns)->container_idx, (ns)->container_flags)
////////////////////////////////
//~ rjf: String <=> Enum
+80 -14
View File
@@ -19,14 +19,23 @@ p2r_end_of_cplusplus_container_name(String8 str)
U64 result = 0;
if(str.size >= 2)
{
String8 str_before_templates = str8_prefix(str, str8_find_needle(str, 0, str8_lit("<"), 0));
for(U64 i = str_before_templates.size; i >= 2; i -= 1)
S64 template_nest_depth = 0;
for(U64 i = str.size; i >= 2; i -= 1)
{
if(str_before_templates.str[i - 2] == ':' && str_before_templates.str[i - 1] == ':')
if(template_nest_depth == 0 && str.str[i - 2] == ':' && str.str[i - 1] == ':')
{
result = i;
break;
}
if(str.str[i-1] == '>')
{
template_nest_depth += 1;
}
else if(str.str[i-1] == '<')
{
template_nest_depth -= 1;
template_nest_depth = ClampBot(template_nest_depth, 0);
}
}
}
return result;
@@ -2873,6 +2882,10 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
// rjf: symbol name -> container name
String8 container_name = str8_chop(str8_prefix(symbol_name, p2r_end_of_cplusplus_container_name(symbol_name)), 2);
// rjf: non-empty container name -> gather
if(container_name.size != 0)
{
U64 container_name_hash = u64_hash_from_str8(container_name);
// rjf: first, check if this container already showed up from type info
@@ -2914,6 +2927,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
}
}
}
}
lane_sync();
//- rjf: combine + fold into the all_namespaces table
@@ -3023,7 +3037,6 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
for EachIndex(node_in_slot_idx, node_count)
{
P2R_NamespaceNode *n = nodes[node_in_slot_idx];
raddbg_log("%S%s\n", n->string, n->corresponds_to_scope ? " (is scope)" : n->type != 0 ? " (is type)" : "");
if(n->corresponds_to_scope || n->scope != 0 || n->type != 0) { continue; }
String8 string = n->string;
RDIM_Namespace *ns = rdim_namespace_chunk_list_push(arena, &lane_namespaces, 32);
@@ -3316,10 +3329,17 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
}
}
// rjf: un-namespaceify the symbol name
String8 name__maybe_partially_qualified = name;
if(got_container)
{
name__maybe_partially_qualified = str8_skip(name, container_name_opl);
}
// rjf: build symbol
RDIM_Symbol *symbol = rdim_symbol_chunk_list_push(arena, sym_global_variables, sym_global_variables_chunk_cap);
symbol->is_extern = (iter.kind == CV_SymKind_GDATA32);
symbol->name = name;
symbol->name = name__maybe_partially_qualified;
symbol->type = type;
symbol->container_scope = container_scope;
symbol->container_type = container_type;
@@ -3435,12 +3455,19 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
}
}
// rjf: un-namespaceify the symbol name
String8 name__maybe_partially_qualified = name;
if(got_container)
{
name__maybe_partially_qualified = str8_skip(name, container_name_opl);
}
// rjf: build procedure symbol
if(params->subset_flags & (RDIM_SubsetFlag_Procedures|RDIM_SubsetFlag_ProcedureNameMap))
{
curr_proc_symbol = rdim_symbol_chunk_list_push(arena, sym_procedures, sym_procedures_chunk_cap);
curr_proc_symbol->is_extern = (iter.kind == CV_SymKind_GPROC32);
curr_proc_symbol->name = name;
curr_proc_symbol->name = name__maybe_partially_qualified;
curr_proc_symbol->link_name = link_name;
curr_proc_symbol->type = type;
curr_proc_symbol->container_scope = container_scope;
@@ -3564,6 +3591,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
{
RDIM_Scope *scope = top_scope_node->scope;
RDIM_Symbol *local = rdim_symbol_chunk_list_push(arena, &scope->locals, 8);
local->container_scope = scope;
local->is_param = is_param;
local->name = name;
local->type = type;
@@ -3599,29 +3627,57 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
RDIM_Type *type = p2r_type_ptr_from_itype(thread32->itype);
// rjf: unpack thread variable's container type
B32 got_container = 0;
RDIM_Type *container_type = 0;
U64 container_name_opl = p2r_end_of_cplusplus_container_name(name);
if(container_name_opl > 2)
String8 container_name = str8_chop(str8_prefix(name, container_name_opl), 2);
if(!got_container && container_name.size != 0)
{
String8 container_name = str8(name.str, container_name_opl - 2);
CV_TypeId cv_type_id = pdb_tpi_first_itype_from_name(tpi_hash, tpi_leaf, container_name, 0);
container_type = p2r_type_ptr_from_itype(cv_type_id);
got_container = (container_type != 0);
}
// rjf: unpack thread variable's container symbol
RDIM_Scope *container_scope = 0;
if(container_type == 0 && top_scope_node != 0)
if(!got_container && top_scope_node != 0)
{
got_container = 1;
container_scope = top_scope_node->scope;
}
// rjf: unpack proc's container namespace
RDIM_Namespace *container_namespace = 0;
if(!got_container && container_name.size != 0)
{
U64 hash = u64_hash_from_str8(container_name);
U64 slot_idx = hash%all_namespace_slots_count;
for(P2R_NamespaceNode *n = all_namespace_slots[slot_idx]; n != 0; n = n->next)
{
if(str8_match(container_name, n->string, 0) &&
n->ns != 0)
{
container_namespace = n->ns;
break;
}
}
}
// rjf: un-namespaceify the symbol name
String8 name__maybe_partially_qualified = name;
if(got_container)
{
name__maybe_partially_qualified = str8_skip(name, container_name_opl);
}
// rjf: build symbol
RDIM_Symbol *tvar = rdim_symbol_chunk_list_push(arena, sym_thread_variables, sym_thread_variables_chunk_cap);
tvar->name = name;
tvar->name = name__maybe_partially_qualified;
tvar->type = type;
tvar->is_extern = (iter.kind == CV_SymKind_GTHREAD32);
tvar->container_type = container_type;
tvar->container_scope = container_scope;
tvar->container_namespace = container_namespace;
RDIM_Location loc = {.kind = RDI_LocationKind_TLSOff, .offset = tls_off};
RDIM_Rng1U64 range = {0, 0xffffffffffffffffull};
rdim_location_case_list_push(arena, &tvar->location_cases, loc, range);
@@ -3665,6 +3721,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
RDIM_Scope *scope = top_scope_node->scope;
RDIM_Symbol *local = rdim_symbol_chunk_list_push(arena, &scope->locals, 8);
{
local->container_scope = scope;
local->is_param = !!(slocal->flags & CV_LocalFlag_Param);
local->name = name;
local->type = type;
@@ -4061,7 +4118,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
lane_sync();
//////////////////////////////////////////////////////////////
//- rjf: upgrade namespaces with container info
//- rjf: upgrade namespaces with container info; trim off container names
//
for EachNode(n, RDIM_NamespaceChunkNode, all_namespaces.first)
{
@@ -4069,7 +4126,11 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
for EachInRange(n_idx, range)
{
RDIM_Namespace *ns = &n->v[n_idx];
String8 container_name = str8_chop(str8_prefix(ns->name, p2r_end_of_cplusplus_container_name(ns->name)), 2);
U64 container_name_opl = p2r_end_of_cplusplus_container_name(ns->name);
String8 container_name = str8_chop(str8_prefix(ns->name, container_name_opl), 2);
if(container_name.size != 0)
{
String8 leaf_name = str8_skip(ns->name, container_name_opl);
U64 hash = u64_hash_from_str8(container_name);
U64 slot_idx = hash%all_namespace_slots_count;
for(P2R_NamespaceNode *ns_n = all_namespace_slots[slot_idx]; ns_n != 0; ns_n = ns_n->next)
@@ -4082,6 +4143,8 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
break;
}
}
ns->name = leaf_name;
}
}
}
lane_sync();
@@ -4762,7 +4825,9 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
if(dst_type != 0 && dst_type->udt != 0 && udt_name.size != 0)
{
// rjf: unpack fully qualified namespace from udt name
String8 container_name = str8_chop(str8_prefix(udt_name, p2r_end_of_cplusplus_container_name(udt_name)), 2);
U64 container_name_opl = p2r_end_of_cplusplus_container_name(udt_name);
String8 container_name = str8_chop(str8_prefix(udt_name, container_name_opl), 2);
String8 leaf_name = str8_skip(udt_name, container_name_opl);
// rjf: look up namespace node associated with namespace
P2R_NamespaceNode *ns_node = 0;
@@ -4779,7 +4844,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
}
}
// rjf: equip container info to udt
// rjf: equip container info to udt, equip partial name to type
if(ns_node != 0)
{
RDIM_UDT *udt = dst_type->udt;
@@ -4795,6 +4860,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
{
udt->container_type = ns_node->type;
}
dst_type->name = leaf_name;
}
}
}