@@ -8513,7 +8513,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
85138513 return ERR_INVALID_ARGUMENT ;
85148514 }
85158515
8516- locals = mono_debug_lookup_locals (method , FALSE );
8516+ locals = mono_debug_lookup_locals (method );
85178517 if (!locals ) {
85188518 if (CHECK_PROTOCOL_VERSION (2 , 43 )) {
85198519 /* Scopes */
@@ -9230,13 +9230,14 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
92309230 pos = - pos - 1 ;
92319231 cmd_stack_frame_get_parameter (frame , sig , pos , buf , jit );
92329232 } else {
9233- MonoDebugLocalsInfo * locals ;
9234-
9235- locals = mono_debug_lookup_locals (frame -> de .method , TRUE);
9236- if (locals ) {
9237- g_assert (pos < locals -> num_locals );
9238- pos = locals -> locals [pos ].index ;
9239- mono_debug_free_locals (locals );
9233+ if (!CHECK_PROTOCOL_VERSION (2 , 59 )) { //from newer protocol versions it's sent the pdb index
9234+ MonoDebugLocalsInfo * locals ;
9235+ locals = mono_debug_lookup_locals (frame -> de .method );
9236+ if (locals ) {
9237+ g_assert (pos < locals -> num_locals );
9238+ pos = locals -> locals [pos ].index ;
9239+ mono_debug_free_locals (locals );
9240+ }
92409241 }
92419242
92429243 PRINT_DEBUG_MSG (4 , "[dbg] send local %d.\n" , pos );
@@ -9284,13 +9285,14 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
92849285 var = & jit -> params [pos ];
92859286 is_arg = TRUE;
92869287 } else {
9287- MonoDebugLocalsInfo * locals ;
9288-
9289- locals = mono_debug_lookup_locals (frame -> de .method , TRUE);
9290- if (locals ) {
9291- g_assert (pos < locals -> num_locals );
9292- pos = locals -> locals [pos ].index ;
9293- mono_debug_free_locals (locals );
9288+ if (!CHECK_PROTOCOL_VERSION (2 , 59 )) { //from newer protocol versions it's sent the pdb index
9289+ MonoDebugLocalsInfo * locals ;
9290+ locals = mono_debug_lookup_locals (frame -> de .method );
9291+ if (locals ) {
9292+ g_assert (pos < locals -> num_locals );
9293+ pos = locals -> locals [pos ].index ;
9294+ mono_debug_free_locals (locals );
9295+ }
92949296 }
92959297 g_assert (pos >= 0 && pos < jit -> num_locals );
92969298
0 commit comments