added basic functionalities to the debugger mode

This commit is contained in:
cozis
2021-11-02 09:17:03 +00:00
parent 7e04b0fc6d
commit 022610bb71
7 changed files with 267 additions and 22 deletions
+16
View File
@@ -23,6 +23,22 @@ struct xRuntime {
Heap *heap;
};
int Runtime_GetCurrentIndex(Runtime *runtime)
{
if(runtime->depth == 0)
return -1;
else
return runtime->frame->index;
}
Executable *Runtime_GetCurrentExecutable(Runtime *runtime)
{
if(runtime->depth == 0)
return NULL;
else
return runtime->frame->exe;
}
Runtime *Runtime_New(int stack_size, int heap_size, void *callback_userp, _Bool (*callback_addr)(Runtime*, void*))
{
if(stack_size < 0)