mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
subset flag for constants conversion; fix empty-tpi-hash case
This commit is contained in:
@@ -318,6 +318,7 @@ X(Units, units)\
|
|||||||
X(Procedures, procedures)\
|
X(Procedures, procedures)\
|
||||||
X(GlobalVariables, global_variables)\
|
X(GlobalVariables, global_variables)\
|
||||||
X(ThreadVariables, thread_variables)\
|
X(ThreadVariables, thread_variables)\
|
||||||
|
X(Constants, constants)\
|
||||||
X(Scopes, scopes)\
|
X(Scopes, scopes)\
|
||||||
X(Locals, locals)\
|
X(Locals, locals)\
|
||||||
X(Types, types)\
|
X(Types, types)\
|
||||||
|
|||||||
+14
-12
@@ -823,8 +823,11 @@ pdb_leaf_data_from_tpi(PDB_TpiParsed *tpi){
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal CV_TypeIdArray
|
internal CV_TypeIdArray
|
||||||
pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *leaf,
|
pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *leaf, String8 name, B32 compare_unique_name, U32 output_cap)
|
||||||
String8 name, B32 compare_unique_name, U32 output_cap){
|
{
|
||||||
|
CV_TypeIdArray result = {0};
|
||||||
|
if(tpi_hash->bucket_count != 0)
|
||||||
|
{
|
||||||
U32 hash = pdb_hash_v1(name);
|
U32 hash = pdb_hash_v1(name);
|
||||||
U32 bucket_idx = ((tpi_hash->bucket_mask != 0) ?
|
U32 bucket_idx = ((tpi_hash->bucket_mask != 0) ?
|
||||||
hash&tpi_hash->bucket_mask :
|
hash&tpi_hash->bucket_mask :
|
||||||
@@ -835,7 +838,8 @@ pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParse
|
|||||||
String8 data = leaf->data;
|
String8 data = leaf->data;
|
||||||
|
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
struct Chain{
|
struct Chain
|
||||||
|
{
|
||||||
struct Chain *next;
|
struct Chain *next;
|
||||||
CV_TypeId itype;
|
CV_TypeId itype;
|
||||||
};
|
};
|
||||||
@@ -1004,26 +1008,24 @@ pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParse
|
|||||||
*itype_ptr = node->itype;
|
*itype_ptr = node->itype;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CV_TypeIdArray result = {0};
|
|
||||||
result.itypes = itypes;
|
result.itypes = itypes;
|
||||||
result.count = count;
|
result.count = count;
|
||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
return(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal CV_TypeId
|
internal CV_TypeId
|
||||||
pdb_tpi_first_itype_from_name(PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *tpi_leaf,
|
pdb_tpi_first_itype_from_name(PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *tpi_leaf, String8 name, B32 compare_unique_name)
|
||||||
String8 name, B32 compare_unique_name){
|
{
|
||||||
Temp scratch = scratch_begin(0, 0);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
CV_TypeIdArray array = pdb_tpi_itypes_from_name(scratch.arena, tpi_hash, tpi_leaf,
|
CV_TypeIdArray array = pdb_tpi_itypes_from_name(scratch.arena, tpi_hash, tpi_leaf, name, compare_unique_name, 1);
|
||||||
name, compare_unique_name, 1);
|
|
||||||
CV_TypeId result = 0;
|
CV_TypeId result = 0;
|
||||||
if (array.count > 0){
|
if(array.count > 0)
|
||||||
|
{
|
||||||
result = array.itypes[0];
|
result = array.itypes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4118,6 +4118,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
|||||||
|
|
||||||
//- rjf: CONSTANT
|
//- rjf: CONSTANT
|
||||||
case CV_SymKind_CONSTANT:
|
case CV_SymKind_CONSTANT:
|
||||||
|
if(params->subset_flags & RDIM_SubsetFlag_Constants)
|
||||||
{
|
{
|
||||||
// rjf: unpack
|
// rjf: unpack
|
||||||
CV_SymConstant *sym = (CV_SymConstant *)sym_header_struct_base;
|
CV_SymConstant *sym = (CV_SymConstant *)sym_header_struct_base;
|
||||||
|
|||||||
Reference in New Issue
Block a user