From e44128de96825d0a67661e8f2975d1067d2fa968 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Sat, 17 Feb 2024 21:26:23 -0800 Subject: [PATCH] bugfix udt member parsing --- src/raddbgi_from_pdb/raddbgi_from_pdb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/raddbgi_from_pdb/raddbgi_from_pdb.c b/src/raddbgi_from_pdb/raddbgi_from_pdb.c index 38e0c6c8..e109e588 100644 --- a/src/raddbgi_from_pdb/raddbgi_from_pdb.c +++ b/src/raddbgi_from_pdb/raddbgi_from_pdb.c @@ -1652,11 +1652,11 @@ p2r_convert(Arena *arena, P2R_ConvertIn *in) CV_LeafKind field_kind = *(CV_LeafKind *)read_ptr; U64 field_leaf_header_size = cv_header_struct_size_from_leaf_kind(field_kind); U8 *field_leaf_first = read_ptr+2; - U8 *field_leaf_opl = field_leaf_first+field_leaf_header_size; + U8 *field_leaf_opl = field_leaf_first+range->hdr.size-2; next_read_ptr = field_leaf_opl; // rjf: skip out-of-bounds fields - if(field_leaf_opl > field_list_opl) + if(field_leaf_first+field_leaf_header_size > field_list_opl) { continue; } @@ -2561,11 +2561,6 @@ p2r_convert(Arena *arena, P2R_ConvertIn *in) CV_Reg cv_reg = regrel32->reg; U32 var_off = regrel32->reg_off; - if(str8_match(name, str8_lit("basics"), 0)) - { - int x = 0; - } - // rjf: determine if this is a parameter RDI_LocalKind local_kind = RDI_LocalKind_Variable; {