forked from catchorg/Catch2
		
	Add support for breaking into debugger for Linux
Use Linux-specific /proc/$PID/status file to check whether we're being debugged and a generic raise(SIGTRAP) to actually break into the debugger.
This commit is contained in:
		
				
					committed by
					
						
						Martin Hořeňovský
					
				
			
			
				
	
			
			
			
						parent
						
							e3659cdddd
						
					
				
				
					commit
					b634e592da
				
			@@ -35,6 +35,10 @@ namespace Catch{
 | 
			
		||||
        #endif
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
#elif defined(CATCH_PLATFORM_LINUX)
 | 
			
		||||
    #include <signal.h>
 | 
			
		||||
 | 
			
		||||
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { raise(SIGTRAP); }
 | 
			
		||||
#elif defined(_MSC_VER)
 | 
			
		||||
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { __debugbreak(); }
 | 
			
		||||
#elif defined(__MINGW32__)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user