Mercurial > projects > dstep
comparison dstep/coreservices/carboncore/Debugging.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 21, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.coreservices.carboncore.Debugging; | |
8 | |
9 //import dstep.AssertMacros; | |
10 //import dstep.AvailabilityMacros; | |
11 import dstep.coreservices.carboncore.MacErrors; | |
12 import dstep.coreservices.carboncore.MacTypes; | |
13 import dstep.coreservices.carboncore.MixedMode; | |
14 | |
15 alias DebugComponentCallbackProcPtr DebugComponentCallbackUPP; | |
16 alias DebugAssertOutputHandlerProcPtr DebugAssertOutputHandlerUPP; | |
17 | |
18 extern (C) | |
19 { | |
20 alias void function (uint, uint, char*, char*, char*, char*, int, void*, char*) DebugAssertOutputHandlerProcPtr; | |
21 alias void function (int, uint, char*) DebugComponentCallbackProcPtr; | |
22 } | |
23 | |
24 enum | |
25 { | |
26 kBlessedBusErrorBait = 0x68F168F1 | |
27 } | |
28 | |
29 enum | |
30 { | |
31 k68kInterruptLevelMask = 0x00000007, | |
32 kInVBLTaskMask = 0x00000010, | |
33 kInDeferredTaskMask = 0x00000020, | |
34 kInSecondaryIntHandlerMask = 0x00000040, | |
35 kInNestedInterruptMask = 0x00000080 | |
36 } | |
37 | |
38 enum | |
39 { | |
40 kComponentDebugOption = 0 | |
41 } | |
42 | |
43 enum | |
44 { | |
45 kGetDebugOption = 1, | |
46 kSetDebugOption = 2 | |
47 } | |
48 | |
49 extern (C) | |
50 { | |
51 void DebugAssert (uint componentSignature, uint options, char* assertionString, char* exceptionLabelString, char* errorString, char* fileName, int lineNumber, void* value); | |
52 uint TaskLevel (); | |
53 int NewDebugComponent (uint componentSignature, char* componentName, DebugComponentCallbackUPP componentCallback); | |
54 int NewDebugOption (uint componentSignature, int optionSelectorNum, char* optionName); | |
55 int DisposeDebugComponent (uint componentSignature); | |
56 int GetDebugComponentInfo (uint itemIndex, OSType* componentSignature, ubyte[256] componentName); | |
57 int GetDebugOptionInfo (uint itemIndex, uint componentSignature, SInt32* optionSelectorNum, ubyte[256] optionName, char* optionSetting); | |
58 int SetDebugOptionValue (uint componentSignature, int optionSelectorNum, ubyte newOptionSetting); | |
59 void InstallDebugAssertOutputHandler (DebugAssertOutputHandlerUPP handler); | |
60 char* GetMacOSStatusErrorString (int err); | |
61 char* GetMacOSStatusCommentString (int err); | |
62 DebugComponentCallbackUPP NewDebugComponentCallbackUPP (DebugComponentCallbackProcPtr userRoutine); | |
63 DebugAssertOutputHandlerUPP NewDebugAssertOutputHandlerUPP (DebugAssertOutputHandlerProcPtr userRoutine); | |
64 void DisposeDebugComponentCallbackUPP (DebugComponentCallbackUPP userUPP); | |
65 void DisposeDebugAssertOutputHandlerUPP (DebugAssertOutputHandlerUPP userUPP); | |
66 void InvokeDebugComponentCallbackUPP (int optionSelectorNum, uint command, char* optionSetting, DebugComponentCallbackUPP userUPP); | |
67 void InvokeDebugAssertOutputHandlerUPP (uint componentSignature, uint options, char* assertionString, char* exceptionLabelString, char* errorString, char* fileName, int lineNumber, void* value, char* outputMsg, DebugAssertOutputHandlerUPP userUPP); | |
68 } |