Changeset 373 for trunk/Include
- Timestamp:
- Nov 6, 2007, 2:35:38 AM (17 years ago)
- Location:
- trunk/Include/system
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/system/exception.ab
r372 r373 6 6 Const basePtr As LONG_PTR 7 7 Const stackPtr As LONG_PTR 8 context As CONTEXT9 8 Const debugProcNum As DWord 10 9 … … 13 12 This.basePtr = basePtr 14 13 This.stackPtr = stackPtr 15 16 Dim tempContext As CONTEXT17 18 tempContext.ContextFlags = CONTEXT_CONTROL or CONTEXT_INTEGER19 If Thread.CurrentThread().__GetContext(tempContext) = 0 Then20 ' TODO: エラー処理21 debug22 End If23 context = tempContext24 14 25 15 #ifdef _DEBUG … … 58 48 59 49 'Try 60 Function BeginTryScope( addressOfCatch As VoidPtr, basePtr As LONG_PTR, stackPtr As LONG_PTR ) As TryLayer50 Function _BeginTryScope( addressOfCatch As VoidPtr, basePtr As LONG_PTR, stackPtr As LONG_PTR ) As TryLayer 61 51 ppTryLayers = _System_realloc( ppTryLayers, ( nTryLayers + 1 ) * SizeOf( *TryLayer ) ) 62 52 ppTryLayers[nTryLayers] = New TryLayer( addressOfCatch, basePtr, stackPtr ) … … 64 54 65 55 Return ByVal ppTryLayers[nTryLayers-1] 56 End Function 57 58 Static Function BeginTryScope( addressOfCatch As VoidPtr, basePtr As LONG_PTR, stackPtr As LONG_PTR ) As TryLayer 59 Return _System_pobj_AllThreads->GetCurrentException()->_BeginTryScope( addressOfCatch, basePtr, stackPtr ) 66 60 End Function 67 61 … … 92 86 '-------------------------------------------------- 93 87 94 'レジスタ情報を取得 95 Dim context = ppTryLayers[nTryLayers - 1]->context 88 Dim context As CONTEXT 89 context.ContextFlags = CONTEXT_CONTROL or CONTEXT_INTEGER 90 If GetThreadContext( GetCurrentThread(), context ) = 0 Then 91 ' TODO: エラー処理 92 debug 93 End If 96 94 97 'カレント スレッドを取得 98 Dim thread = Thread.CurrentThread 99 100 '新しいip, spをセット 95 '新しいip, sp, bpをセット 101 96 #ifdef _WIN64 102 97 context.Rip = ppTryLayers[nTryLayers - 1]->addressOfCatch As QWord … … 116 111 End If 117 112 #endif 118 debug 119 If thread.__SetContext(context ) = 0 Then113 114 If SetThreadContext( GetCurrentThread(), context ) = 0 Then 120 115 OutputDebugString(Ex"レジスタ情報の設定に失敗しました。\r\n") 121 116 Return 122 117 End If 123 debug124 118 End Sub 125 119 … … 127 121 _Throw() 128 122 End Sub 129 130 Static Sub AllocateObject( pObj As VoidPtr )131 Dim thread = Thread.CurrentThread132 'TODO: ローカルオブジェクトを登録133 End Sub134 135 Static Sub DeallocateObject( pObj As VoidPtr )136 'TODO: ローカルオブジェクトを破棄137 End Sub138 123 End Class 139 124 -
trunk/Include/system/gc.sbp
r370 r373 8 8 Dim _System_gc_StackRoot_StartPtr As VoidPtr 9 9 */ 10 11 Function _System_GetSp() As LONG_PTR 'dummy12 End Function13 14 10 15 11 Const _System_GC_FLAG_ATOMIC = 1
Note:
See TracChangeset
for help on using the changeset viewer.