mago support

This commit is contained in:
Vadim Lopatin 2015-02-25 15:04:32 +03:00
parent 30bb9da1ca
commit 02cc55e707
3 changed files with 5476 additions and 66 deletions

View File

@ -8,10 +8,12 @@
<multiobj>0</multiobj>
<singleFileCompilation>0</singleFileCompilation>
<oneobj>0</oneobj>
<mscoff>0</mscoff>
<trace>0</trace>
<quiet>0</quiet>
<verbose>0</verbose>
<vtls>0</vtls>
<vgc>0</vgc>
<symdebug>1</symdebug>
<optimize>0</optimize>
<cpu>0</cpu>
@ -44,8 +46,12 @@
<nofloat>0</nofloat>
<Dversion>2</Dversion>
<ignoreUnsupportedPragmas>0</ignoreUnsupportedPragmas>
<allinst>0</allinst>
<stackStomp>0</stackStomp>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
<cccmd>$(CC) -c</cccmd>
<ccTransOpt>1</ccTransOpt>
<program>$(DMDInstallDir)windows\bin\dmd.exe</program>
<imppath>$(SolutionDir)/src $(SolutionDir)/3rdparty $(SolutionDir)/3rdparty/libpng/source $(SolutionDir)/../DerelictGL3/source $(SolutionDir)/../DerelictUtil/source $(SolutionDir)/../DerelictFT/source $(SolutionDir)/../DerelictSDL2/source $(SolutionDir)/../de_image/source/interfaces $(SolutionDir)/../de_image/source/png $(SolutionDir)/../dlib $(SolutionDir)/../libdparse/src</imppath>
<fileImppath>views views/res views/res/i18n views/res/mdpi</fileImppath>
@ -89,6 +95,7 @@
<resfile />
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
<useStdLibPath>1</useStdLibPath>
<cRuntime>2</cRuntime>
<additionalOptions>-profile</additionalOptions>
<preBuildCommand />
<postBuildCommand />
@ -102,10 +109,12 @@
<multiobj>0</multiobj>
<singleFileCompilation>0</singleFileCompilation>
<oneobj>0</oneobj>
<mscoff>0</mscoff>
<trace>0</trace>
<quiet>0</quiet>
<verbose>0</verbose>
<vtls>0</vtls>
<vgc>0</vgc>
<symdebug>0</symdebug>
<optimize>1</optimize>
<cpu>0</cpu>
@ -138,8 +147,12 @@
<nofloat>0</nofloat>
<Dversion>2</Dversion>
<ignoreUnsupportedPragmas>0</ignoreUnsupportedPragmas>
<allinst>0</allinst>
<stackStomp>0</stackStomp>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
<cccmd>$(CC) -c</cccmd>
<ccTransOpt>1</ccTransOpt>
<program>$(DMDInstallDir)windows\bin\dmd.exe</program>
<imppath>$(SolutionDir)/src $(SolutionDir)/3rdparty $(SolutionDir)/3rdparty/libpng/source $(SolutionDir)/../DerelictGL3/source $(SolutionDir)/../DerelictUtil/source $(SolutionDir)/../DerelictFT/source $(SolutionDir)/../DerelictSDL2/source $(SolutionDir)/../de_image/source/interfaces $(SolutionDir)/../de_image/source/png $(SolutionDir)/../dlib</imppath>
<fileImppath>views views/res views/res/i18n views/res/mdpi</fileImppath>
@ -183,6 +196,7 @@
<resfile />
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
<useStdLibPath>1</useStdLibPath>
<cRuntime>1</cRuntime>
<additionalOptions />
<preBuildCommand />
<postBuildCommand />
@ -202,6 +216,7 @@
<Folder name="windows">
<File path="src\ddebug\windows\debuginfo.d" />
<File path="src\ddebug\windows\mago.d" />
<File path="src\ddebug\windows\msdbg.d" />
<File path="src\ddebug\windows\windebug.d" />
</Folder>
</Folder>

View File

@ -1,76 +1,13 @@
module ddebug.windows.mago;
version(Windows):
version(USE_MAGO):
import ddebug.windows.msdbg;
import dlangui.core.logger;
//import core.stdc.stdio;
//import core.stdc.stdlib;
import win32.windows;
import win32.objbase;
import win32.oaidl;
import win32.wtypes;
const GUID CLSID_MAGO = {0xE348A53A, 0x470A, 0x4A70, [0x9B, 0x55, 0x1E, 0x02, 0xF3, 0x52, 0x79, 0x0D]};
//const GUID CLSID_MAGO = {0xE348A53A, 0x470A, 0x4A70, [0x9B, 0x55, 0x1E, 0x02, 0xF3, 0x52, 0x79, 0x0D]};
const GUID IID_MAGO_NATIVE_ENGINE = {0x97348AC0, 0x2B6B, 0x4B99, [0xA2, 0x45, 0x4C, 0x7E, 0x2C, 0x09, 0xD4, 0x03]};
const GUID IID_IDebugEngine2 = {0xba105b52, 0x12f1, 0x4038, [0xae, 0x64, 0xd9, 0x57, 0x85, 0x87, 0x4c, 0x47]};
interface IEnumDebugPrograms2 : IUnknown {
}
interface IDebugProgram2 : IUnknown {
}
interface IDebugProgramNode2 : IUnknown {
}
interface IDebugEventCallback2 : IUnknown {
}
interface IDebugBreakpointRequest2 : IUnknown {
}
interface IDebugPendingBreakpoint2 : IUnknown {
}
interface IDebugEvent2 : IUnknown {
}
struct EXCEPTION_INFO {
}
alias ATTACH_REASON = uint;
interface IDebugEngine2 : IUnknown {
//extern(Windows):
HRESULT EnumPrograms(IEnumDebugPrograms2 ** p);
HRESULT Attach( IDebugProgram2 **rgpPrograms,
IDebugProgramNode2 **rgpProgramNodes,
DWORD celtPrograms,
IDebugEventCallback2 *pCallback,
ATTACH_REASON dwReason);
HRESULT CreatePendingBreakpoint(IDebugBreakpointRequest2 *pBPRequest,
IDebugPendingBreakpoint2 **ppPendingBP);
HRESULT SetException(EXCEPTION_INFO *pException);
HRESULT RemoveSetException( EXCEPTION_INFO *pException);
HRESULT RemoveAllSetExceptions(REFGUID guidType);
HRESULT GetEngineId(GUID *pguidEngine);
HRESULT DestroyProgram(IDebugProgram2 *pProgram);
HRESULT ContinueFromSynchronousEvent(IDebugEvent2 *pEvent);
HRESULT SetLocale(WORD wLangID);
HRESULT SetRegistryRoot(LPCOLESTR pszRegistryRoot);
HRESULT SetMetric(LPCOLESTR pszMetric, VARIANT varValue);
HRESULT CauseBreak();
}
void testMago() {
HRESULT hr;
@ -99,4 +36,5 @@ void testMago() {
GUID eid;
debugEngine.GetEngineId(&eid);
Log.d("Engine id: ", eid);
}

5457
src/ddebug/windows/msdbg.d Normal file

File diff suppressed because it is too large Load Diff