first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,58 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __SCRIPT_VM_DEBUG_PROFILE_EVENT_HANDLER__
#define __SCRIPT_VM_DEBUG_PROFILE_EVENT_HANDLER__
#include "script/script_vm.h"
#include "script/script_debugger.h"
#include "memory/nauto_ptr.h"
namespace GS {
namespace Script {
/*!
@short Debugger/profiling VM event handler.
This handler provides basic functionality such as VM stepping and profiling.
This class should be further derived to implement complete control over the VM.
@author Emmanuel Julien (ejulien@owloh.com)
*/
class IDebuggerProfiler : public IVM::IDebug
{
static String ConvertCallStackToMetaString(const AutoList <IVM::CallStackEntry *> &, int stack_frame_index);
protected:
sVM vm;
public:
AutoPtr <IDebugger> debugger;
String GetCallstack();
String GetDebugStackFrameLocals();
void Kill();
// Debugger interface.
virtual void OnSuspendExecution(const char *source, int line) = 0;
virtual bool OnUpdateSuspendedExecution() = 0;
// VM interface implementation.
void OnStep(char type, const char *source, int line, const char *func);
IDebuggerProfiler(IVM *vm, IDebugger *debugger);
};
} // Script
} // GS
#endif // __SCRIPT_VM_DEBUG_PROFILE_EVENT_HANDLER__