Add simple debug initialisation function
This commit is contained in:
parent
fa5a6c9ed9
commit
5e764244ac
13
debug.cpp
13
debug.cpp
@ -17,8 +17,8 @@
|
||||
* Copyright 2010 Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#include "debug.hpp"
|
||||
#include "backtrace.hpp"
|
||||
#include "debug.hpp"
|
||||
#include "log.hpp"
|
||||
#include "platform.hpp"
|
||||
|
||||
@ -127,3 +127,14 @@ disable_fpe (void) {
|
||||
// _controlfp_s (&ignored, 0, _MCW_EM);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void debug::init (void) {
|
||||
#if defined(PLATFORM_WIN32)
|
||||
if (nullptr == LoadLibrary("exchndl.dll")) {
|
||||
std::cerr << GetLastError () << "\n";
|
||||
LOG_WARNING("Emergency debugger not loaded");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -162,9 +162,11 @@ class panic_error {
|
||||
void panic (const std::string&) terminal;
|
||||
void panic (void) terminal;
|
||||
|
||||
|
||||
void not_implemented (void) terminal;
|
||||
void not_implemented (const char*) terminal;
|
||||
|
||||
|
||||
void unreachable (void) terminal;
|
||||
void unreachable (const std::string&) terminal;
|
||||
void unusual (void);
|
||||
@ -176,4 +178,9 @@ void breakpoint (void);
|
||||
void enable_fpe (void);
|
||||
void disable_fpe (void);
|
||||
|
||||
|
||||
namespace debug {
|
||||
void init (void);
|
||||
}
|
||||
|
||||
#endif // __DEBUG_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user