Changeset 7455 for code/trunk/src/libraries/util/SignalHandler.h
- Timestamp:
- Sep 15, 2010, 6:14:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/util/SignalHandler.h
r7452 r7455 43 43 #include "SpecialConfig.h" 44 44 45 namespace orxonox46 {47 typedef int (*SignalCallback)( void * someData );48 }49 50 45 #if defined(ORXONOX_PLATFORM_LINUX) 51 46 … … 55 50 namespace orxonox 56 51 { 52 typedef int (*SignalCallback)( void * someData ); 53 57 54 struct SignalRec 58 55 { … … 109 106 { 110 107 friend class Singleton<SignalHandler>; 111 public:112 SignalHandler();113 ~SignalHandler();114 108 115 void doCatch( const std::string & appName, const std::string & filename ); 109 public: 110 SignalHandler(); 111 ~SignalHandler(); 116 112 117 static std::string getStackTrace(PEXCEPTION_POINTERS pExceptionInfo = NULL); 118 static std::string getExceptionType(PEXCEPTION_POINTERS pExceptionInfo); 113 void doCatch(const std::string& appName, const std::string& filename); 119 114 120 private:121 static LONG WINAPI exceptionFilter(PEXCEPTION_POINTERS pExceptionInfo);115 static std::string getStackTrace(PEXCEPTION_POINTERS pExceptionInfo = NULL); 116 static std::string getExceptionType(PEXCEPTION_POINTERS pExceptionInfo); 122 117 123 static std::string getModuleName(const std::string& path);124 static DWORD getModuleBase(DWORD dwAddress);118 private: 119 static LONG WINAPI exceptionFilter(PEXCEPTION_POINTERS pExceptionInfo); 125 120 126 template <typename T> 127 static std::string pointerToString(T pointer); 128 template <typename T> 129 static std::string pointerToString(T* pointer); 121 static std::string getModuleName(const std::string& path); 122 static DWORD getModuleBase(DWORD dwAddress); 130 123 131 static SignalHandler* singletonPtr_s; 124 template <typename T> 125 static std::string pointerToString(T pointer, bool bFillZeros = true); 126 template <typename T> 127 static std::string pointerToString(T* pointer); 132 128 133 std::string filename_; 134 LPTOP_LEVEL_EXCEPTION_FILTER prevExceptionFilter_; 129 static SignalHandler* singletonPtr_s; 130 131 std::string filename_; 132 LPTOP_LEVEL_EXCEPTION_FILTER prevExceptionFilter_; 135 133 }; 136 134 } … … 144 142 { 145 143 friend class Singleton<SignalHandler>; 146 public:147 void doCatch( const std::string & appName, const std::string & filename ) {}148 144 149 private: 150 static SignalHandler* singletonPtr_s; 145 public: 146 void doCatch(const std::string& appName, const std::string& filename) {} 147 148 private: 149 static SignalHandler* singletonPtr_s; 151 150 }; 152 151 }
Note: See TracChangeset
for help on using the changeset viewer.