mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-16 09:02:22 -07:00
rdi_from_pdb: inline binary annotations parsing
This commit is contained in:
@@ -237,6 +237,21 @@ cv_decode_inline_annot_s32(String8 data, U64 offset, S32 *out_value)
|
||||
return read_size;
|
||||
}
|
||||
|
||||
internal S32
|
||||
cv_inline_annot_signed_from_unsigned_operand(U32 value)
|
||||
{
|
||||
if(value & 1)
|
||||
{
|
||||
value = -(value >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = value >> 1;
|
||||
}
|
||||
S32 result = (S32)value;
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ CodeView Parsing Functions
|
||||
|
||||
@@ -611,6 +626,7 @@ cv_c13_parsed_from_data(Arena *arena, String8 c13_data, PDB_Strtbl *strtbl, PDB_
|
||||
//- rjf: fill output
|
||||
//
|
||||
CV_C13Parsed *result = push_array(arena, CV_C13Parsed, 1);
|
||||
result->data = c13_data;
|
||||
result->first_sub_section = first;
|
||||
result->last_sub_section = last;
|
||||
result->sub_section_count = count;
|
||||
|
||||
@@ -2946,6 +2946,9 @@ struct CV_C13SubSectionNode
|
||||
typedef struct CV_C13Parsed CV_C13Parsed;
|
||||
struct CV_C13Parsed
|
||||
{
|
||||
// rjf: source data
|
||||
String8 data;
|
||||
|
||||
// rjf: full sub-section list
|
||||
CV_C13SubSectionNode *first_sub_section;
|
||||
CV_C13SubSectionNode *last_sub_section;
|
||||
@@ -2988,6 +2991,9 @@ internal F64 cv_f64_from_numeric(CV_NumericParsed *num);
|
||||
internal U64 cv_decode_inline_annot_u32(String8 data, U64 offset, U32 *out_value);
|
||||
internal U64 cv_decode_inline_annot_s32(String8 data, U64 offset, S32 *out_value);
|
||||
|
||||
internal S32 cv_inline_annot_signed_from_unsigned_operand(U32 value);
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
//~ CodeView Parsing Functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user