From 7597bccd4686be2a18fa6319162628fd39fdaa03 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Fri, 16 Feb 2024 12:51:17 -0800 Subject: [PATCH] raddbgi from pdb: fix chunk list concats --- src/lib_raddbgi_make/raddbgi_make.c | 9 +++++++-- src/lib_raddbgi_make/raddbgi_make.h | 22 +++++++++++----------- src/raddbgi_from_pdb/raddbgi_from_pdb.c | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/lib_raddbgi_make/raddbgi_make.c b/src/lib_raddbgi_make/raddbgi_make.c index 328d4e60..3b285875 100644 --- a/src/lib_raddbgi_make/raddbgi_make.c +++ b/src/lib_raddbgi_make/raddbgi_make.c @@ -604,6 +604,8 @@ rdim_udt_chunk_list_concat_in_place(RDIM_UDTChunkList *dst, RDIM_UDTChunkList *t dst->last = to_push->last; dst->chunk_count += to_push->chunk_count; dst->total_count += to_push->total_count; + dst->total_member_count += to_push->total_member_count; + dst->total_enum_val_count += to_push->total_enum_val_count; } else if(dst->first == 0) { @@ -736,6 +738,9 @@ rdim_scope_chunk_list_concat_in_place(RDIM_ScopeChunkList *dst, RDIM_ScopeChunkL dst->last = to_push->last; dst->chunk_count += to_push->chunk_count; dst->total_count += to_push->total_count; + dst->scope_voff_count += to_push->scope_voff_count; + dst->local_count += to_push->local_count; + dst->location_count += to_push->location_count; } else if(dst->first == 0) { @@ -1480,7 +1485,7 @@ rdim_bake(RDIM_Arena *arena, RDIM_BakeParams *params) unit_lines = arranged_lines; unit_cols = 0; unit_line_count = key_count; - scratch_end(scratch); + rdim_scratch_end(scratch); } //////////////////////// @@ -1654,7 +1659,7 @@ rdim_bake(RDIM_Arena *arena, RDIM_BakeParams *params) src_file_line_count = line_count; src_file_voffs = voffs; src_file_voff_count = voff_count; - scratch_end(scratch); + rdim_scratch_end(scratch); } ////////////////////////// diff --git a/src/lib_raddbgi_make/raddbgi_make.h b/src/lib_raddbgi_make/raddbgi_make.h index 1959c2bf..0dd37153 100644 --- a/src/lib_raddbgi_make/raddbgi_make.h +++ b/src/lib_raddbgi_make/raddbgi_make.h @@ -758,30 +758,30 @@ struct RDIM_ScopeChunkList //////////////////////////////// //~ rjf: Name Map Types -typedef struct RDIM_NameMapIdxNode RDIM_NameMapIdxNode; -struct RDIM_NameMapIdxNode +typedef struct RDIM_NameMapValNode RDIM_NameMapValNode; +struct RDIM_NameMapValNode { - RDIM_NameMapIdxNode *next; - RDI_U32 idx[8]; + RDIM_NameMapValNode *next; + void *val[8]; }; typedef struct RDIM_NameMapNode RDIM_NameMapNode; struct RDIM_NameMapNode { - RDIM_NameMapNode *bucket_next; + RDIM_NameMapNode *slot_next; RDIM_NameMapNode *order_next; RDIM_String8 string; - RDIM_NameMapIdxNode *idx_first; - RDIM_NameMapIdxNode *idx_last; - RDI_U64 idx_count; + RDIM_NameMapValNode *val_first; + RDIM_NameMapValNode *val_last; + RDI_U64 val_count; }; typedef struct RDIM_NameMap RDIM_NameMap; struct RDIM_NameMap { - RDIM_NameMapNode **buckets; - RDI_U64 buckets_count; - RDI_U64 bucket_collision_count; + RDIM_NameMapNode **slots; + RDI_U64 slots_count; + RDI_U64 slot_collision_count; RDIM_NameMapNode *first; RDIM_NameMapNode *last; RDI_U64 name_count; diff --git a/src/raddbgi_from_pdb/raddbgi_from_pdb.c b/src/raddbgi_from_pdb/raddbgi_from_pdb.c index f00deacc..8b6b2704 100644 --- a/src/raddbgi_from_pdb/raddbgi_from_pdb.c +++ b/src/raddbgi_from_pdb/raddbgi_from_pdb.c @@ -3742,7 +3742,7 @@ p2r_convert(Arena *arena, P2R_ConvertIn *in) } ////////////////////////////////////////////////////////////// - //- rjf: build unit array + //- rjf: build units // RDIM_UnitChunkList units = {0}; ProfScope("build unit array")