30 static_assert (
sizeof (pointer_sized_int) ==
sizeof (
void*),
"Basic sanity test failed: please report!");
31 static_assert (
sizeof (int8) == 1,
"Basic sanity test failed: please report!");
32 static_assert (
sizeof (uint8) == 1,
"Basic sanity test failed: please report!");
33 static_assert (
sizeof (int16) == 2,
"Basic sanity test failed: please report!");
34 static_assert (
sizeof (uint16) == 2,
"Basic sanity test failed: please report!");
35 static_assert (
sizeof (int32) == 4,
"Basic sanity test failed: please report!");
36 static_assert (
sizeof (uint32) == 4,
"Basic sanity test failed: please report!");
37 static_assert (
sizeof (int64) == 8,
"Basic sanity test failed: please report!");
38 static_assert (
sizeof (uint64) == 8,
"Basic sanity test failed: please report!");
40 return "JUCE v" JUCE_STRINGIFY(JUCE_MAJOR_VERSION)
41 "." JUCE_STRINGIFY(JUCE_MINOR_VERSION)
42 "." JUCE_STRINGIFY(JUCE_BUILDNUMBER);
45 #if JUCE_ANDROID && ! defined (JUCE_DISABLE_JUCE_VERSION_PRINTING) 46 #define JUCE_DISABLE_JUCE_VERSION_PRINTING 1 49 #if JUCE_DEBUG && ! JUCE_DISABLE_JUCE_VERSION_PRINTING 50 struct JuceVersionPrinter
58 static JuceVersionPrinter juceVersionPrinter;
77 ids.
add (address.toString());
87 CPUInformation() noexcept { initialise(); }
89 void initialise() noexcept;
91 int numLogicalCPUs = 0, numPhysicalCPUs = 0;
103 static const CPUInformation& getCPUInformation() noexcept
105 static CPUInformation info;
141 #if JUCE_ANDROID || JUCE_MINGW 145 HANDLE process = GetCurrentProcess();
146 SymInitialize (process,
nullptr, TRUE);
149 int frames = (int) CaptureStackBackTrace (0, numElementsInArray (stack), stack,
nullptr);
152 symbol.
calloc (
sizeof (SYMBOL_INFO) + 256, 1);
153 symbol->MaxNameLen = 255;
154 symbol->SizeOfStruct =
sizeof (SYMBOL_INFO);
156 for (
int i = 0; i < frames; ++i)
158 DWORD64 displacement = 0;
160 if (SymFromAddr (process, (DWORD64) stack[i], &displacement, symbol))
164 IMAGEHLP_MODULE64 moduleInfo;
165 zerostruct (moduleInfo);
166 moduleInfo.SizeOfStruct =
sizeof (moduleInfo);
168 if (::SymGetModuleInfo64 (process, symbol->ModBase, &moduleInfo))
169 result << moduleInfo.ModuleName <<
": ";
171 result << symbol->Name <<
" + 0x" <<
String::toHexString ((int64) displacement) << newLine;
177 int frames = backtrace (stack, numElementsInArray (stack));
178 char** frameStrings = backtrace_symbols (stack, frames);
180 for (
int i = 0; i < frames; ++i)
181 result << frameStrings[i] << newLine;
183 ::free (frameStrings);
193 static LONG WINAPI handleCrash (LPEXCEPTION_POINTERS ep)
195 globalCrashHandler (ep);
196 return EXCEPTION_EXECUTE_HANDLER;
199 static void handleCrash (
int signum)
201 globalCrashHandler ((
void*) (pointer_sized_int) signum);
202 ::kill (getpid(), SIGKILL);
205 int juce_siginterrupt (
int sig,
int flag);
210 jassert (handler !=
nullptr);
211 globalCrashHandler = handler;
214 SetUnhandledExceptionFilter (handleCrash);
216 const int signals[] = { SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGABRT, SIGSYS };
218 for (
int i = 0; i < numElementsInArray (signals); ++i)
220 ::signal (signals[i], handleCrash);
221 juce_siginterrupt (signals[i], 1);
228 #if JUCE_MAC || JUCE_IOS 229 static bool firstQuery =
true;
230 static bool isRunningInAppSandbox =
false;
246 return isRunningInAppSandbox;
bool isEmpty() const noexcept
static bool has3DNow() noexcept
static bool hasAVX512PF() noexcept
static bool hasAVX512VPOPCNTDQ() noexcept
static Array< MACAddress > getAllAddresses()
File getParentDirectory() const
static bool hasAVX512F() noexcept
static bool hasAVX() noexcept
static bool hasSSE2() noexcept
void calloc(SizeType newNumElements, const size_t elementSize=sizeof(ElementType))
static bool hasFMA4() noexcept
static bool hasSSSE3() noexcept
static String getJUCEVersion()
void(*)(void *) CrashHandlerFunction
static void setApplicationCrashHandler(CrashHandlerFunction)
static bool hasNeon() noexcept
static String toHexString(IntegerType number)
static bool hasSSE41() noexcept
String getFileExtension() const
static String getStackBacktrace()
static bool hasSSE42() noexcept
static bool hasSSE3() noexcept
static bool hasSSE() noexcept
static bool hasAVX512BW() noexcept
static bool hasAVX512VL() noexcept
static bool isRunningInAppExtensionSandbox() noexcept
static bool hasAVX512DQ() noexcept
static int getNumPhysicalCpus() noexcept
static bool hasAVX512CD() noexcept
static bool hasAVX512ER() noexcept
static bool hasAVX512IFMA() noexcept
static File JUCE_CALLTYPE getSpecialLocation(const SpecialLocationType type)
static bool hasFMA3() noexcept
static bool hasAVX2() noexcept
static int getNumCpus() noexcept
static bool hasMMX() noexcept
uint64 getFileIdentifier() const
void add(String stringToAdd)
static bool hasAVX512VBMI() noexcept
static StringArray getDeviceIdentifiers()