diff options
author | Christopher Faylor <me@cgf.cx> | 2002-05-27 02:25:28 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-05-27 02:25:28 +0000 |
commit | 918a268c8085f18ff6683a9b5979411c064ace82 (patch) | |
tree | edd780e3950fc24cc81f9f39d5a6d1fd6e449d63 /winsup/cygwin/debug.h | |
parent | 0cfbfc249f26bec6c407bb54d8e5e7a65c95afe0 (diff) | |
download | newlib-918a268c8085f18ff6683a9b5979411c064ace82.zip newlib-918a268c8085f18ff6683a9b5979411c064ace82.tar.gz newlib-918a268c8085f18ff6683a9b5979411c064ace82.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/cygwin/debug.h')
-rw-r--r-- | winsup/cygwin/debug.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h index 0b7e533..9efafc1 100644 --- a/winsup/cygwin/debug.h +++ b/winsup/cygwin/debug.h @@ -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))); |