* debug.h (being_debugged): New macro.
* dtable.cc (dtable::extend): Use new macro. * exceptions.cc (try_to_debug): Ditto. * strace.cc (strace::hello): Only output debugging info when we think we're being debugged.
This commit is contained in:
@ -28,6 +28,9 @@ DWORD __stdcall WFMO (DWORD, CONST HANDLE *, BOOL, DWORD) __attribute__ ((regpar
|
||||
#if !defined(_DEBUG_H_)
|
||||
#define _DEBUG_H_
|
||||
|
||||
#define being_debugged() \
|
||||
(IsDebuggerPresent () || GetLastError () == ERROR_PROC_NOT_FOUND)
|
||||
|
||||
void threadname_init ();
|
||||
HANDLE __stdcall makethread (LPTHREAD_START_ROUTINE, LPVOID, DWORD, const char *) __attribute__ ((regparm(3)));
|
||||
const char * __stdcall threadname (DWORD, int lockit = TRUE) __attribute__ ((regparm(2)));
|
||||
|
Reference in New Issue
Block a user