@@ -938,6 +938,10 @@ static bool _mScriptCoreAdapterClearBreakpoint(struct mScriptCoreAdapter* adapte
938
938
}
939
939
return true;
940
940
}
941
+
942
+ uint64_t _mScriptCoreAdapterCurrentCycle (struct mScriptCoreAdapter * adapter ) {
943
+ return mTimingGlobalTime (adapter -> core -> timing );
944
+ }
941
945
#endif
942
946
943
947
static void _mScriptCoreAdapterDeinit (struct mScriptCoreAdapter * adapter ) {
@@ -1085,6 +1089,7 @@ mSCRIPT_DECLARE_STRUCT_VOID_METHOD(mScriptCoreAdapter, write16, _mScriptCoreAdap
1085
1089
mSCRIPT_DECLARE_STRUCT_VOID_METHOD (mScriptCoreAdapter , write32 , _mScriptCoreAdapterWrite32 , 2 , U32 , address , U32 , value );
1086
1090
1087
1091
#ifdef ENABLE_DEBUGGERS
1092
+ mSCRIPT_DECLARE_STRUCT_METHOD (mScriptCoreAdapter , U64 , currentCycle , _mScriptCoreAdapterCurrentCycle , 0 );
1088
1093
mSCRIPT_DECLARE_STRUCT_METHOD_WITH_DEFAULTS (mScriptCoreAdapter , S64 , setBreakpoint , _mScriptCoreAdapterSetBreakpoint , 3 , WRAPPER , callback , U32 , address , S32 , segment );
1089
1094
mSCRIPT_DECLARE_STRUCT_METHOD_WITH_DEFAULTS (mScriptCoreAdapter , S64 , setWatchpoint , _mScriptCoreAdapterSetWatchpoint , 4 , WRAPPER , callback , U32 , address , S32 , type , S32 , segment );
1090
1095
mSCRIPT_DECLARE_STRUCT_METHOD_WITH_DEFAULTS (mScriptCoreAdapter , S64 , setRangeWatchpoint , _mScriptCoreAdapterSetRangeWatchpoint , 5 , WRAPPER , callback , U32 , minAddress , U32 , maxAddress , S32 , type , S32 , segment );
@@ -1150,6 +1155,8 @@ mSCRIPT_DEFINE_STRUCT(mScriptCoreAdapter)
1150
1155
mSCRIPT_DEFINE_STRUCT_METHOD (mScriptCoreAdapter , write16 )
1151
1156
mSCRIPT_DEFINE_STRUCT_METHOD (mScriptCoreAdapter , write32 )
1152
1157
#ifdef ENABLE_DEBUGGERS
1158
+ mSCRIPT_DEFINE_DOCSTRING ("Get the current execution cycle" )
1159
+ mSCRIPT_DEFINE_STRUCT_METHOD (mScriptCoreAdapter , currentCycle )
1153
1160
mSCRIPT_DEFINE_DOCSTRING ("Set a breakpoint at a given address" )
1154
1161
mSCRIPT_DEFINE_STRUCT_METHOD (mScriptCoreAdapter , setBreakpoint )
1155
1162
mSCRIPT_DEFINE_DOCSTRING ("Clear a breakpoint or watchpoint for a given id returned by a previous call" )
0 commit comments