X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e702ab351f24530b90709025ac52a3a1c96b3d8..60c0a8dbf449725ab81a0b26ca2538625c81c359:/include/wx/debug.h?ds=sidebyside diff --git a/include/wx/debug.h b/include/wx/debug.h index 93f394a60b..cae70c2e92 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -6,7 +6,7 @@ // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DEBUG_H_ @@ -182,13 +182,13 @@ WXDLLEXPORT_DATA(extern const bool) wxFalse; result in a warning about unused variable) and a named struct (otherwise we'd get a warning about an unnamed struct not used to define an object!). The _n__ part is to stop VC++ 7 being confused since it encloses __LINE++ in - parentheses. Unfortunately this does not work with MetroWerks CW so this fix - is being limited to VC++. + parentheses. Unfortunately this does not work with other compilers, so + we will only enable it when we know the _precise_ symbols to test for. */ #define wxMAKE_ASSERT_NAME_HELPER(line) wxAssert_ ## line #define wxMAKE_ASSERT_NAME(line) wxMAKE_ASSERT_NAME_HELPER(line) -#ifdef __VISUALC__ +#if 0 #define wxMAKE_UNIQUE_ASSERT_NAME wxMAKE_ASSERT_NAME(_n___ ## __LINE__) #else #define wxMAKE_UNIQUE_ASSERT_NAME wxMAKE_ASSERT_NAME(__LINE__) @@ -218,5 +218,19 @@ WXDLLEXPORT_DATA(extern const bool) wxFalse; wxCOMPILE_TIME_ASSERT(sizeof(type) * CHAR_BIT >= size, \ wxMAKE_BITSIZE_MSG(type, size)) +// ---------------------------------------------------------------------------- +// other miscellaneous debugger-related functions +// ---------------------------------------------------------------------------- + +// return true if we're running under debugger +// +// currently this only really works under Mac in CodeWarrior builds, it always +// returns false otherwise +#ifdef __WXMAC__ + extern bool WXDLLEXPORT wxIsDebuggerRunning(); +#else // !Mac + inline bool WXDLLEXPORT wxIsDebuggerRunning() { return false; } +#endif // Mac/!Mac + #endif // _WX_DEBUG_H_