moved common codeview code to the main layer

This commit is contained in:
Nikita Smith
2024-11-21 15:58:32 -08:00
parent 7ac7bea420
commit a0dbe72820
9 changed files with 1005 additions and 1133 deletions
+2 -18
View File
@@ -415,22 +415,6 @@ p2r_location_from_addr_reg_off(Arena *arena, RDI_Arch arch, RDI_RegCode reg_code
return result;
}
internal CV_EncodedFramePtrReg
p2r_cv_encoded_fp_reg_from_frameproc(CV_SymFrameproc *frameproc, B32 param_base)
{
CV_EncodedFramePtrReg result = 0;
CV_FrameprocFlags flags = frameproc->flags;
if(param_base)
{
result = CV_FrameprocFlags_ExtractParamBasePointer(flags);
}
else
{
result = CV_FrameprocFlags_ExtractLocalBasePointer(flags);
}
return result;
}
internal RDI_RegCode
p2r_reg_code_from_arch_encoded_fp_reg(RDI_Arch arch, CV_EncodedFramePtrReg encoded_reg)
{
@@ -2762,7 +2746,7 @@ ASYNC_WORK_DEF(p2r_symbol_stream_convert_work)
U64 gap_count = ((U8*)sym_data_opl - (U8*)gaps) / sizeof(*gaps);
// rjf: select frame pointer register
CV_EncodedFramePtrReg encoded_fp_reg = p2r_cv_encoded_fp_reg_from_frameproc(frameproc, defrange_target_is_param);
CV_EncodedFramePtrReg encoded_fp_reg = cv_pick_fp_encoding(frameproc, defrange_target_is_param);
RDI_RegCode fp_register_code = p2r_reg_code_from_arch_encoded_fp_reg(in->arch, encoded_fp_reg);
// rjf: build location
@@ -2834,7 +2818,7 @@ ASYNC_WORK_DEF(p2r_symbol_stream_convert_work)
// rjf: unpack sym
CV_SymDefrangeFramepointerRelFullScope *defrange_fprel_full_scope = (CV_SymDefrangeFramepointerRelFullScope*)sym_header_struct_base;
CV_EncodedFramePtrReg encoded_fp_reg = p2r_cv_encoded_fp_reg_from_frameproc(frameproc, defrange_target_is_param);
CV_EncodedFramePtrReg encoded_fp_reg = cv_pick_fp_encoding(frameproc, defrange_target_is_param);
RDI_RegCode fp_register_code = p2r_reg_code_from_arch_encoded_fp_reg(in->arch, encoded_fp_reg);
// rjf: build location
-1
View File
@@ -568,7 +568,6 @@ internal RDI_TypeKind p2r_rdi_type_kind_from_cv_basic_type(CV_BasicType basic_ty
//~ rjf: Location Info Building Helpers
internal RDIM_Location *p2r_location_from_addr_reg_off(Arena *arena, RDI_Arch arch, RDI_RegCode reg_code, U32 reg_byte_size, U32 reg_byte_pos, S64 offset, B32 extra_indirection);
internal CV_EncodedFramePtrReg p2r_cv_encoded_fp_reg_from_frameproc(CV_SymFrameproc *frameproc, B32 param_base);
internal RDI_RegCode p2r_reg_code_from_arch_encoded_fp_reg(RDI_Arch arch, CV_EncodedFramePtrReg encoded_reg);
internal void p2r_location_over_lvar_addr_range(Arena *arena, RDIM_ScopeChunkList *scopes, RDIM_LocationSet *locset, RDIM_Location *location, CV_LvarAddrRange *range, COFF_SectionHeader *section, CV_LvarAddrGap *gaps, U64 gap_count);