mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-14 04:49:41 -07:00
fix dbg_info loader treatment of nil keys, avoid bad usage of blank '.rdi' files; os_lnx_* -> lnx_*
This commit is contained in:
1 parent
50a68b9d8c
commit
dcc78314ab
10 files changed
+178
-173
No files matched your search
+30
-26
@@ -205,8 +205,11 @@ di_key_from_path_timestamp(String8 path, U64 min_timestamp)
|
||||
if(!made_key)
|
||||
{
|
||||
made_key = 1;
|
||||
U128 hash = u128_hash_from_seed_str8(min_timestamp, path);
|
||||
MemoryCopy(&key, &hash, Min(sizeof(hash), sizeof(key)));
|
||||
if(path.size != 0)
|
||||
{
|
||||
U128 hash = u128_hash_from_seed_str8(min_timestamp, path);
|
||||
MemoryCopy(&key, &hash, Min(sizeof(hash), sizeof(key)));
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: made key -> store in (key -> path/timestamp) table
|
||||
@@ -698,6 +701,7 @@ di_async_tick(void)
|
||||
|
||||
//- rjf: compute key's RDI path
|
||||
String8 rdi_path = {0};
|
||||
if(og_path.size != 0)
|
||||
{
|
||||
if(og_is_rdi)
|
||||
{
|
||||
@@ -1151,8 +1155,8 @@ di_search_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *
|
||||
U64 element_count = 0;
|
||||
void *table_base = rdi_section_raw_table_from_kind(rdi, section_kind, &element_count);
|
||||
U64 element_size = rdi_section_element_size_table[section_kind];
|
||||
|
||||
// rjf: do search
|
||||
|
||||
// rjf: do search
|
||||
Rng1U64 range = lane_range(element_count);
|
||||
for EachInRange(idx, range)
|
||||
{
|
||||
@@ -1170,7 +1174,7 @@ di_search_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *
|
||||
case RDI_SectionKind_UDTs:
|
||||
{
|
||||
RDI_UDT *udt = (RDI_UDT *)element;
|
||||
RDI_TypeNode *type_node = rdi_element_from_name_idx(rdi, TypeNodes, udt->self_type_idx);
|
||||
RDI_TypeNode *type_node = rdi_element_from_name_idx(rdi, TypeNodes, udt->self_type_idx);
|
||||
name = fully_qualified_from_rdi_string_and_container(arena, rdi, type_node->user_defined.name_string_idx, udt->container_idx, udt->container_flags);
|
||||
}break;
|
||||
case RDI_SectionKind_SourceFiles:
|
||||
@@ -1192,9 +1196,9 @@ di_search_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *
|
||||
scratch_end(scratch);
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
RDI_Symbol *symbol = (RDI_Symbol *)element;
|
||||
name = fully_qualified_str8_from_rdi_symbol(arena, rdi, symbol);
|
||||
{
|
||||
RDI_Symbol *symbol = (RDI_Symbol *)element;
|
||||
name = fully_qualified_str8_from_rdi_symbol(arena, rdi, symbol);
|
||||
}break;
|
||||
}
|
||||
if(name.size == 0) { continue; }
|
||||
@@ -1496,12 +1500,12 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
|
||||
//- rjf: unpack key
|
||||
U64 index = 0;
|
||||
U64 index = 0;
|
||||
String8 name = {0};
|
||||
DI_Key preferred_key = {0};
|
||||
{
|
||||
U64 key_read_off = 0;
|
||||
key_read_off += str8_deserial_read_struct(key, key_read_off, &index);
|
||||
key_read_off += str8_deserial_read_struct(key, key_read_off, &index);
|
||||
key_read_off += str8_deserial_read_struct(key, key_read_off, &preferred_key);
|
||||
key_read_off += str8_deserial_read_struct(key, key_read_off, &name.size);
|
||||
name.str = push_array_no_zero(scratch.arena, U8, name.size);
|
||||
@@ -1634,14 +1638,14 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
|
||||
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
|
||||
|
||||
// rjf: do we have a container? -> filter matches according to container string also
|
||||
U32 *filtered_matches = matches;
|
||||
U32 filtered_matches_count = matches_count;
|
||||
U32 filtered_matches_count = matches_count;
|
||||
if(container_part_of_name.size != 0)
|
||||
{
|
||||
filtered_matches = push_array(scratch.arena, U32, matches_count);
|
||||
filtered_matches_count = 0;
|
||||
{
|
||||
filtered_matches = push_array(scratch.arena, U32, matches_count);
|
||||
filtered_matches_count = 0;
|
||||
for EachIndex(match_idx, matches_count)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
@@ -1678,16 +1682,16 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: do we have a specific unit queried? -> filter matches according to containing unit
|
||||
#if 0
|
||||
if(target_unit_index != 0)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// rjf: do we have a specific unit queried? -> filter matches according to containing unit
|
||||
#if 0
|
||||
if(target_unit_index != 0)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
// rjf: given matches, pick selected & return as result
|
||||
if(filtered_matches_count != 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user