Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
only get locals in older protocol versions.
  • Loading branch information
thaystg authored and github-actions committed Aug 19, 2021
commit 8bd038dad0e0278f09261bd60c4ce58d270a26f0
24 changes: 10 additions & 14 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -9289,16 +9289,14 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
pos = - pos - 1;
cmd_stack_frame_get_parameter (frame, sig, pos, buf, jit);
} else {
MonoDebugLocalsInfo *locals;

locals = mono_debug_lookup_locals (frame->de.method);
if (locals) {
if (!CHECK_PROTOCOL_VERSION (2, 59)) //from newer protocol versions it's sent the pdb index
{
if (!CHECK_PROTOCOL_VERSION (2, 59)) { //from newer protocol versions it's sent the pdb index
MonoDebugLocalsInfo *locals;
locals = mono_debug_lookup_locals (frame->de.method);
if (locals) {
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
mono_debug_free_locals (locals);
}
mono_debug_free_locals (locals);
}

PRINT_DEBUG_MSG (4, "[dbg] send local %d.\n", pos);
Expand Down Expand Up @@ -9346,16 +9344,14 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
var = &jit->params [pos];
is_arg = TRUE;
} else {
MonoDebugLocalsInfo *locals;

locals = mono_debug_lookup_locals (frame->de.method);
if (locals) {
if (!CHECK_PROTOCOL_VERSION (2, 59)) //from newer protocol versions it's sent the pdb index
{
if (!CHECK_PROTOCOL_VERSION (2, 59)) { //from newer protocol versions it's sent the pdb index
MonoDebugLocalsInfo *locals;
locals = mono_debug_lookup_locals (frame->de.method);
if (locals) {
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
mono_debug_free_locals (locals);
}
mono_debug_free_locals (locals);
}
g_assert (pos >= 0 && pos < jit->num_locals);

Expand Down