@@ -101,7 +101,11 @@ typedef __int64 int64_t;
101101 /// <summary>
102102 /// Perform a single step back to the previous statement (only applicable in TTD mode).
103103 /// </summary>
104- JsDiagStepTypeStepBack = 3
104+ JsDiagStepTypeStepBack = 3 ,
105+ /// <summary>
106+ /// Perform a reverse continue operation (only applicable in TTD mode).
107+ /// </summary>
108+ JsDiagStepTypeStepReverseContinue = 4
105109 } JsDiagStepType ;
106110
107111 /// <summary>
@@ -661,15 +665,10 @@ typedef __int64 int64_t;
661665 /// </summary>
662666 JsTTDMoveKthEvent = 0x4 ,
663667
664- /// <summary>
665- /// Indicates if we want to scan the snapshot interval containing the event to populate debug info before moving to execute event.
666- /// </summary>
667- JsTTDMoveScanIntervalBeforeDebugExecute = 0x10 ,
668-
669668 /// <summary>
670669 /// Indicates if we are doing the scan for a continue operation
671670 /// </summary>
672- JsTTDMoveScanIntervalForContinue = 0x20 ,
671+ JsTTDMoveScanIntervalForContinue = 0x10 ,
673672
674673 /// <summary>
675674 /// Indicates if we want to set break on entry or just run and let something else trigger breakpoints.
@@ -705,7 +704,7 @@ typedef __int64 int64_t;
705704 /// <param name="read">If the handle should be opened for reading.</param>
706705 /// <param name="write">If the handle should be opened for writing.</param>
707706 /// <returns>A JsTTDStreamHandle opened in read/write mode as specified.</returns>
708- typedef JsTTDStreamHandle (CHAKRA_CALLBACK * TTDOpenResourceStreamCallback )(_In_ size_t uriByteLength , _In_reads_ (uriByteLength ) const byte * uriBytes , _In_z_ const char * asciiResourceName , _In_ bool read , _In_ bool write );
707+ typedef JsTTDStreamHandle (CHAKRA_CALLBACK * TTDOpenResourceStreamCallback )(_In_ size_t uriByteLength , _In_reads_ (uriByteLength ) const byte * uriBytes , _In_z_ const char * asciiResourceName , _In_ bool read , _In_ bool write , _Out_opt_ byte * * relocatedUri , _Out_opt_ size_t * relocatedUriLength );
709708
710709 /// <summary>
711710 /// TTD API -- may change in future versions:
@@ -949,6 +948,17 @@ typedef __int64 int64_t;
949948 JsTTDRawBufferAsyncModifyComplete (
950949 _In_ byte * finalModPos );
951950
951+ /// <summary>
952+ /// TTD API -- may change in future versions:
953+ /// A check for unimplmented TTD actions in the host.
954+ /// This API is a TEMPORARY API while we complete the implementation of TTD support in the Node host and will be deleted once that is complete.
955+ /// </summary>
956+ /// <param name="msg">The message to print if we should be catching this as a TTD operation.</param>
957+ /// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
958+ CHAKRA_API
959+ JsTTDCheckAndAssertIfTTDRunning (
960+ _In_ const char * msg );
961+
952962 /// <summary>
953963 /// TTD API -- may change in future versions:
954964 /// Before calling JsTTDMoveToTopLevelEvent (which inflates a snapshot and replays) check to see if we want to reset the script context.
@@ -967,31 +977,65 @@ typedef __int64 int64_t;
967977 _Out_ int64_t * targetStartSnapTime ,
968978 _Out_opt_ int64_t * targetEndSnapTime );
969979
980+ /// <summary>
981+ /// TTD API -- may change in future versions:
982+ /// Get the snapshot interval that bounds the target event time.
983+ /// </summary>
984+ /// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
985+ /// <param name="targetEventTime">The event time we want to get the interval for.</param>
986+ /// <param name="startSnapTime">The snapshot time that comes before the desired event.</param>
987+ /// <param name="endSnapTime">The snapshot time that comes after the desired event (-1 if the leg ends before a snapshot appears).</param>
988+ /// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
989+ CHAKRA_API JsTTDGetSnapShotBoundInterval (
990+ _In_ JsRuntimeHandle runtimeHandle ,
991+ _In_ int64_t targetEventTime ,
992+ _Out_ int64_t * startSnapTime ,
993+ _Out_ int64_t * endSnapTime );
994+
995+ /// <summary>
996+ /// TTD API -- may change in future versions:
997+ /// Get the snapshot interval that precedes the one given by currentSnapStartTime (or -1 if there is no such interval).
998+ /// </summary>
999+ /// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
1000+ /// <param name="currentSnapStartTime">The current snapshot interval start time.</param>
1001+ /// <param name="previousSnapTime">The resulting previous snapshot interval start time or -1 if no such time.</param>
1002+ /// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
1003+ CHAKRA_API JsTTDGetPreviousSnapshotInterval (
1004+ _In_ JsRuntimeHandle runtimeHandle ,
1005+ _In_ int64_t currentSnapStartTime ,
1006+ _Out_ int64_t * previousSnapTime );
1007+
9701008 /// <summary>
9711009 /// TTD API -- may change in future versions:
9721010 /// During debug operations some additional information is populated during replay. This runs the code between the given
9731011 /// snapshots to poulate this information which may be needed by the debugger to determine time-travel jump targets.
9741012 /// </summary>
1013+ /// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
9751014 ///<param name = "startSnapTime">The snapshot time that we will start executing from.< / param>
9761015 ///<param name = "endSnapTime">The snapshot time that we will stop at (or -1 if we want to run to the end).< / param>
9771016 /// <param name="moveMode">Additional flags for controling how the move is done.</param>
1017+ /// <param name="newTargetEventTime">The updated target event time set according to the moveMode (-1 if not found).</param>
9781018 /// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
9791019 CHAKRA_API JsTTDPreExecuteSnapShotInterval (
1020+ _In_ JsRuntimeHandle runtimeHandle ,
9801021 _In_ int64_t startSnapTime ,
9811022 _In_ int64_t endSnapTime ,
982- _In_ JsTTDMoveMode moveMode );
1023+ _In_ JsTTDMoveMode moveMode ,
1024+ _Out_ int64_t * newTargetEventTime );
9831025
9841026 /// <summary>
9851027 /// TTD API -- may change in future versions:
9861028 /// Move to the given top-level call event time (assuming JsTTDPrepContextsForTopLevelEventMove) was called previously to reset any script contexts.
9871029 /// This also computes the ready-to-run snapshot if needed.
9881030 /// </summary>
1031+ /// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
9891032 /// <param name="moveMode">Additional flags for controling how the move is done.</param>
9901033 /// <param name="snapshotTime">The event time that we will start executing from to move to the given target time.</param>
9911034 /// <param name="eventTime">The event that we want to move to.</param>
9921035 /// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
9931036 CHAKRA_API
9941037 JsTTDMoveToTopLevelEvent (
1038+ _In_ JsRuntimeHandle runtimeHandle ,
9951039 _In_ JsTTDMoveMode moveMode ,
9961040 _In_ int64_t snapshotTime ,
9971041 _In_ int64_t eventTime );
@@ -1010,6 +1054,6 @@ typedef __int64 int64_t;
10101054 CHAKRA_API
10111055 JsTTDReplayExecution (
10121056 _Inout_ JsTTDMoveMode * moveMode ,
1013- _Inout_ int64_t * rootEventTime );
1057+ _Out_ int64_t * rootEventTime );
10141058
10151059#endif // _CHAKRADEBUG_H_
0 commit comments