mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +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(GlobalVariables, global_variables)\
|
||||
X(ThreadVariables, thread_variables)\
|
||||
X(Constants, constants)\
|
||||
X(Scopes, scopes)\
|
||||
X(Locals, locals)\
|
||||
X(Types, types)\
|
||||
|
||||
+14
-12
@@ -823,8 +823,11 @@ pdb_leaf_data_from_tpi(PDB_TpiParsed *tpi){
|
||||
}
|
||||
|
||||
internal CV_TypeIdArray
|
||||
pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *leaf,
|
||||
String8 name, B32 compare_unique_name, U32 output_cap){
|
||||
pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *leaf, 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 bucket_idx = ((tpi_hash->bucket_mask != 0) ?
|
||||
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;
|
||||
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
struct Chain{
|
||||
struct Chain
|
||||
{
|
||||
struct Chain *next;
|
||||
CV_TypeId itype;
|
||||
};
|
||||
@@ -1004,26 +1008,24 @@ pdb_tpi_itypes_from_name(Arena *arena, PDB_TpiHashParsed *tpi_hash, CV_LeafParse
|
||||
*itype_ptr = node->itype;
|
||||
}
|
||||
}
|
||||
CV_TypeIdArray result = {0};
|
||||
result.itypes = itypes;
|
||||
result.count = count;
|
||||
|
||||
scratch_end(scratch);
|
||||
|
||||
return(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal CV_TypeId
|
||||
pdb_tpi_first_itype_from_name(PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *tpi_leaf,
|
||||
String8 name, B32 compare_unique_name){
|
||||
pdb_tpi_first_itype_from_name(PDB_TpiHashParsed *tpi_hash, CV_LeafParsed *tpi_leaf, String8 name, B32 compare_unique_name)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
CV_TypeIdArray array = pdb_tpi_itypes_from_name(scratch.arena, tpi_hash, tpi_leaf,
|
||||
name, compare_unique_name, 1);
|
||||
CV_TypeIdArray array = pdb_tpi_itypes_from_name(scratch.arena, tpi_hash, tpi_leaf, name, compare_unique_name, 1);
|
||||
CV_TypeId result = 0;
|
||||
if (array.count > 0){
|
||||
if(array.count > 0)
|
||||
{
|
||||
result = array.itypes[0];
|
||||
}
|
||||
|
||||
scratch_end(scratch);
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -4118,6 +4118,7 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
|
||||
|
||||
//- rjf: CONSTANT
|
||||
case CV_SymKind_CONSTANT:
|
||||
if(params->subset_flags & RDIM_SubsetFlag_Constants)
|
||||
{
|
||||
// rjf: unpack
|
||||
CV_SymConstant *sym = (CV_SymConstant *)sym_header_struct_base;
|
||||
|
||||
Reference in New Issue
Block a user