mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1449835 Do not compile Windows x64 Crash Test Assembly for MinGW r=ccorcoran,froydnj
The assembly file uses the wrong syntax and MinGW cannot compile it. (Also, gcc doesn't recognize it, because it ends in .asm and not .s.) MozReview-Commit-ID: 5mHPi8PVio3 --HG-- extra : rebase_source : d10a61e5eda24245105b6acd3e78726feebd9fd1
This commit is contained in:
parent
4d30d44b55
commit
e0f1bbacfc
7
toolkit/crashreporter/test/moz.build
Normal file → Executable file
7
toolkit/crashreporter/test/moz.build
Normal file → Executable file
@ -25,9 +25,10 @@ SOURCES += [
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'x86_64':
|
||||
SOURCES += [
|
||||
'win64UnwindInfoTests.asm',
|
||||
]
|
||||
if CONFIG['CC_TYPE'] != 'gcc':
|
||||
SOURCES += [
|
||||
'win64UnwindInfoTests.asm',
|
||||
]
|
||||
|
||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
SOURCES['ExceptionThrower.cpp'].flags += [
|
||||
|
15
toolkit/crashreporter/test/nsTestCrasher.cpp
Normal file → Executable file
15
toolkit/crashreporter/test/nsTestCrasher.cpp
Normal file → Executable file
@ -1,6 +1,7 @@
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <map>
|
||||
|
||||
#include "nscore.h"
|
||||
#include "mozilla/Unused.h"
|
||||
@ -45,7 +46,7 @@ void PureVirtualCall()
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
#if XP_WIN && HAVE_64BIT_BUILD
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
// Implementation in win64unwindInfoTests.asm
|
||||
uint64_t x64CrashCFITest_NO_MANS_LAND(uint64_t returnpfn, void*);
|
||||
uint64_t x64CrashCFITest_Launcher(uint64_t returnpfn, void* testProc);
|
||||
@ -59,7 +60,7 @@ extern "C" {
|
||||
uint64_t x64CrashCFITest_SAVE_XMM128_FAR(uint64_t returnpfn, void*);
|
||||
uint64_t x64CrashCFITest_EPILOG(uint64_t returnpfn, void*);
|
||||
uint64_t x64CrashCFITest_EOF(uint64_t returnpfn, void*);
|
||||
#endif // XP_WIN && HAVE_64BIT_BUILD
|
||||
#endif // XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
}
|
||||
|
||||
// Keep these in sync with CrashTestUtils.jsm!
|
||||
@ -82,7 +83,7 @@ const int16_t CRASH_X64CFI_SAVE_XMM128_FAR = 18;
|
||||
const int16_t CRASH_X64CFI_EPILOG = 19;
|
||||
const int16_t CRASH_X64CFI_EOF = 20;
|
||||
|
||||
#if XP_WIN && HAVE_64BIT_BUILD
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
|
||||
typedef decltype(&x64CrashCFITest_UnknownOpcode) win64CFITestFnPtr_t;
|
||||
|
||||
@ -158,7 +159,7 @@ void Crash(int16_t how)
|
||||
ThrowException();
|
||||
break;
|
||||
}
|
||||
#if XP_WIN && HAVE_64BIT_BUILD
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
case CRASH_X64CFI_UNKNOWN_OPCODE:
|
||||
case CRASH_X64CFI_PUSH_NONVOL:
|
||||
case CRASH_X64CFI_ALLOC_SMALL:
|
||||
@ -178,7 +179,7 @@ void Crash(int16_t how)
|
||||
pfnLauncher(0, pfnTest);
|
||||
break;
|
||||
}
|
||||
#endif // XP_WIN && HAVE_64BIT_BUILD
|
||||
#endif // XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -217,7 +218,7 @@ void TryOverrideExceptionHandler()
|
||||
|
||||
extern "C" NS_EXPORT uint32_t
|
||||
GetWin64CFITestFnAddrOffset(int16_t fnid) {
|
||||
#if XP_WIN && HAVE_64BIT_BUILD
|
||||
#if XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
// fnid uses the same constants as Crash().
|
||||
// Returns the RVA of the requested function.
|
||||
// Returns 0 on failure.
|
||||
@ -229,5 +230,5 @@ GetWin64CFITestFnAddrOffset(int16_t fnid) {
|
||||
return ((uint64_t)m[fnid]) - moduleBase;
|
||||
#else
|
||||
return 0;
|
||||
#endif // XP_WIN && HAVE_64BIT_BUILD
|
||||
#endif // XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user