debugger: use current stack frame for 'this'

Interpret 'this' expression in current call stack frame.
This commit is contained in:
Nunuhara Cabbage
2024-07-28 15:37:41 -07:00
parent 69deb9ee91
commit 133ff5421f
+1 -1
View File
@@ -590,7 +590,7 @@ error:
static union vm_value dbg_eval_object(struct parse_object *object, struct ain_type *type_out)
{
if (!strcmp(object->ident->text, "this")) {
int32_t page_i = call_stack[call_stack_ptr-1].struct_page;
int32_t page_i = call_stack[call_stack_ptr- (dbg_current_frame + 1)].struct_page;
if (page_i < 0) {
DBG_ERROR("'this' used outside of method");
goto error;