fix breakpad_from_pdb build; robustify to typeless global vars

This commit is contained in:
Ryan Fleury
2024-04-25 11:53:23 -07:00
parent 67eede7513
commit b6eb13761f
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -2920,9 +2920,10 @@ rdim_bake_global_vmap_section_list_from_params(RDIM_Arena *arena, RDIM_BakeParam
{
RDIM_Symbol *global_var = &n->v[chunk_idx];
RDI_U32 global_var_idx = (RDI_U32)rdim_idx_from_symbol(global_var); // TODO(rjf): @u64_to_u32
RDI_U64 global_var_size = global_var->type ? global_var->type->byte_size : 1;
RDI_U64 first = global_var->offset;
RDI_U64 opl = first + global_var->type->byte_size;
RDI_U64 opl = first + global_var_size;
key_ptr->key = first;
key_ptr->val = marker_ptr;
@@ -16,6 +16,9 @@
#include "lib_raddbgi_format/raddbgi_format_parse.h"
#include "lib_raddbgi_format/raddbgi_format.c"
#include "lib_raddbgi_format/raddbgi_format_parse.c"
#include "third_party/rad_lzb_simple/rad_lzb_simple.h"
#include "third_party/rad_lzb_simple/rad_lzb_simple.c"
//- rjf: [h]
#include "base/base_inc.h"
@@ -78,7 +81,7 @@ internal TS_TASK_FUNCTION_DEF(p2b_bake_unit_vmap_task__entry_point)
if(vmap_section != 0)
{
out->vmap_entries = (RDI_VMapEntry *)vmap_section->data;
out->vmap_entries_count = vmap_section->size/sizeof(RDI_VMapEntry);
out->vmap_entries_count = vmap_section->unpacked_size/sizeof(RDI_VMapEntry);
}
return out;
}
@@ -117,7 +120,7 @@ internal TS_TASK_FUNCTION_DEF(p2b_bake_unit_task__entry_point)
}
if(voffs_section != 0 && lines_section != 0)
{
out->unit_line_count = lines_section->size/sizeof(RDI_Line);
out->unit_line_count = lines_section->unpacked_size/sizeof(RDI_Line);
out->unit_line_voffs = (U64 *)voffs_section->data;
out->unit_lines = (RDI_Line *)lines_section->data;
}