Add optional Init(). This can be used so that HOOKS is set and accessible during the child crash handler by moving that code to Init().
This commit is contained in:
@@ -917,7 +917,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
/* Set up arch hooks first. This may set up crash handling. */
|
/* Set up arch hooks first. This may set up crash handling. */
|
||||||
HOOKS = MakeArchHooks();
|
HOOKS = MakeArchHooks();
|
||||||
|
HOOKS->Init();
|
||||||
#if !defined(DEBUG)
|
#if !defined(DEBUG)
|
||||||
/* Tricky: for other exceptions, we want a backtrace. To do this in Windows,
|
/* Tricky: for other exceptions, we want a backtrace. To do this in Windows,
|
||||||
* we need to catch the exception and force a crash. The call stack is still
|
* we need to catch the exception and force a crash. The call stack is still
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class ArchHooks
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ArchHooks() { }
|
virtual ~ArchHooks() { }
|
||||||
|
virtual void Init() { }
|
||||||
/*
|
/*
|
||||||
* Return the general name of the architecture, eg. "Windows", "OS X", "Unix".
|
* Return the general name of the architecture, eg. "Windows", "OS X", "Unix".
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user