mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
Fixed a bug that would cause asserts to be ignored on some android platforms
This commit is contained in:
parent
84da06214d
commit
376b83986a
2 changed files with 10 additions and 1 deletions
|
|
@ -66,6 +66,13 @@ JUCE_API void JUCE_CALLTYPE Process::setPriority (ProcessPriority prior)
|
|||
|
||||
JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger() noexcept
|
||||
{
|
||||
StringArray lines;
|
||||
File ("/proc/self/status").readLines (lines);
|
||||
|
||||
for (int i = lines.size(); --i >= 0;) // (NB - it's important that this runs in reverse order)
|
||||
if (lines[i].upToFirstOccurrenceOf (":", false, false).trim().equalsIgnoreCase ("TracerPid"))
|
||||
return (lines[i].fromFirstOccurrenceOf (":", false, false).trim().getIntValue() > 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_IOS || JUCE_LINUX || JUCE_ANDROID
|
||||
#if JUCE_IOS || JUCE_LINUX
|
||||
/** This will try to break into the debugger if the app is currently being debugged.
|
||||
If called by an app that's not being debugged, the behaviour isn't defined - it may
|
||||
crash or not, depending on the platform.
|
||||
|
|
@ -80,6 +80,8 @@
|
|||
#else
|
||||
#define JUCE_BREAK_IN_DEBUGGER { asm ("int $3"); }
|
||||
#endif
|
||||
#elif JUCE_ANDROID
|
||||
#define JUCE_BREAK_IN_DEBUGGER { __builtin_trap(); }
|
||||
#else
|
||||
#define JUCE_BREAK_IN_DEBUGGER { __asm int 3 }
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue