diff options
author | Kyungwoo Lee <kyulee@microsoft.com> | 2015-11-24 12:34:08 -0800 |
---|---|---|
committer | Kyungwoo Lee <kyulee@microsoft.com> | 2015-11-25 11:58:52 -0800 |
commit | 1b6658714821566dd9ab78dcf1fe96fcb0f8772a (patch) | |
tree | c27daab52b3dbadd9cdf7620cb7b94ffceb2d62b /src/ildasm/dis.cpp | |
parent | 6936820475b8c6b66de1807b0d123c195e18b868 (diff) | |
download | coreclr-1b6658714821566dd9ab78dcf1fe96fcb0f8772a.tar.gz coreclr-1b6658714821566dd9ab78dcf1fe96fcb0f8772a.tar.bz2 coreclr-1b6658714821566dd9ab78dcf1fe96fcb0f8772a.zip |
Enable ILDASM for Windows
This enables building ILDASM with Cmake for Windows.
This ILDASM now depends on CoreCLR targeting cross-platform and thus I dropped some features like GUI/PDB -- default output is console.
Metadata related APIs in CoreCLR are directly exported, and used in ILDASM:
MetaDataGetDispenser
GetMetaDataInternalInterface
GetMetaDataInternalInterfaceFromPublic
GetMetaDataPublicInterfaceFromInternal
The code path is diverged by a definition FEATURE_CORECLR.
There are still Window specific components. Among others, resource file/dll generation is the one that should be ported.
Diffstat (limited to 'src/ildasm/dis.cpp')
-rw-r--r-- | src/ildasm/dis.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ildasm/dis.cpp b/src/ildasm/dis.cpp index 4356b6f40a..a5487360d2 100644 --- a/src/ildasm/dis.cpp +++ b/src/ildasm/dis.cpp @@ -134,9 +134,11 @@ char* AnsiToUtf(__in __nullterminated const char* sz) { return UnicodeToUtf(Ansi static void UnicodeToConsoleOrMsgBox(__in __nullterminated const WCHAR* wz) { +#ifndef FEATURE_CORECLR if (g_Mode & MODE_GUI) WszMessageBox(NULL,wz,RstrW(IDS_ERRORCAPTION),MB_OK|MB_ICONERROR|GetDasmMBRTLStyle()); else +#endif { //DWORD dw; //char* sz = UnicodeToAnsi(wz); @@ -154,9 +156,11 @@ static void UnicodeToFile(__in __nullterminated const WCHAR* wz, FILE* pF) } static void ToGUIOrFile(__in __nullterminated const char* sz, void* GUICookie) { +#ifndef FEATURE_CORECLR if (g_Mode & MODE_GUI) GUIAddOpcode(sz, GUICookie); else +#endif { if(g_fDumpRTF) fprintf((FILE*)GUICookie,"%s\\line\n",sz); else fprintf((FILE*)GUICookie,"%s\n",sz); @@ -872,7 +876,7 @@ BOOL SourceLinesHelper(void *GUICookie, LineCodeDescr* pLCD, __out_ecount(nSize) sprintf_s(szString,SZSTRING_SIZE,RstrUTF(IDS_ERRORREOPENINGFILE),pLCD->FileToken); printError(GUICookie, szString); } - WIN_PAL_ENDTRY + PAL_ENDTRY return param.fRet; } |