allow debugger to be created before the instance and attached to it
later
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
#include "gryphn_debugger.h"
|
||||
#include "core/gryphn_platform_functions.h"
|
||||
#include <core/gryphn_platform_functions.h>
|
||||
#include "stdio.h"
|
||||
|
||||
gnReturnCode gnCreateDebugger(gnDebugger* debugger, gnInstance* instance, const struct gnDebuggerInfo_t info) {
|
||||
if (instance->debugger != NULL)
|
||||
return GN_DEBUGGER_EXISTS;
|
||||
gnReturnCode gnCreateDebugger(gnDebugger* debugger, const struct gnDebuggerInfo_t info) {
|
||||
debugger->info = info;
|
||||
debugger->instance = instance;
|
||||
instance->debugger = debugger;
|
||||
return instance->functions->_gnCreateDebugger(debugger, instance, info);
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
void gnDestroyDebugger(gnDebugger* debugger) {
|
||||
debugger->instance->functions->_gnDestroyDebugger(debugger);
|
||||
// debugger->instance->functions->_gnDestroyDebugger(debugger);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ typedef struct gnDebugger_t {
|
||||
gnInstance* instance;
|
||||
} gnDebugger;
|
||||
|
||||
gnReturnCode gnCreateDebugger(gnDebugger* debugger, gnInstance* instance, const struct gnDebuggerInfo_t info);
|
||||
gnReturnCode gnCreateDebugger(gnDebugger* debugger, const struct gnDebuggerInfo_t info);
|
||||
void gnDestroyDebugger(gnDebugger* debugger);
|
||||
|
||||
static void gnDebuggerSetErrorMessage(gnDebugger* debugger, gnMessageData data) {
|
||||
|
||||
Reference in New Issue
Block a user