mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
add CrashHandler to lobby/api/world and cleanup test code in tools
This commit is contained in:
parent
a29288520b
commit
ae4aab491e
5 changed files with 15 additions and 10 deletions
|
@ -32,6 +32,10 @@
|
|||
#include "Forwards.h"
|
||||
#include "SapphireAPI.h"
|
||||
|
||||
#include <Util/CrashHandler.h>
|
||||
|
||||
Sapphire::Common::Util::CrashHandler crashHandler;
|
||||
|
||||
Sapphire::Db::DbWorkerPool< Sapphire::Db::ZoneDbConnection > g_charaDb;
|
||||
Sapphire::Data::ExdDataGenerated g_exdDataGen;
|
||||
Sapphire::Network::SapphireAPI g_sapphireAPI;
|
||||
|
|
|
@ -65,6 +65,9 @@ void Util::CrashHandler::printStackTrace( unsigned int max_frames )
|
|||
|
||||
#ifndef _WIN32
|
||||
|
||||
// used as is from: https://oroboro.com/stack-trace-on-crash/
|
||||
// only changes output slightly
|
||||
|
||||
void* addrlist[ max_frames + 1 ];
|
||||
|
||||
int addrlen = backtrace( addrlist, sizeof( addrlist ) / sizeof( void* ) );
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include "ServerLobby.h"
|
||||
|
||||
#include <Util/CrashHandler.h>
|
||||
|
||||
Sapphire::Common::Util::CrashHandler crashHandler;
|
||||
|
||||
Sapphire::ServerLobby g_serverLobby( "lobby.ini" );
|
||||
|
||||
int main( int32_t argc, char* argv[] )
|
||||
|
|
|
@ -27,21 +27,11 @@ using namespace Sapphire;
|
|||
//const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" );
|
||||
const std::string datLocation( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" );
|
||||
|
||||
int shit()
|
||||
{
|
||||
int* ptr = nullptr;
|
||||
|
||||
*ptr = 1;
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
Logger::init( "struct_test" );
|
||||
|
||||
shit();
|
||||
|
||||
Logger::info( "Setting up EXD data" );
|
||||
if( !g_exdData.init( datLocation ) )
|
||||
{
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
#include "ServerMgr.h"
|
||||
#include <Framework.h>
|
||||
|
||||
#include <Util/CrashHandler.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
using namespace Sapphire::World;
|
||||
|
||||
Common::Util::CrashHandler crashHandler;
|
||||
|
||||
int main( int32_t argc, char* argv[] )
|
||||
{
|
||||
auto pFramework = Sapphire::make_Framework();
|
||||
|
|
Loading…
Add table
Reference in a new issue