diff --git a/src/Autopilot/autopilot.cxx b/src/Autopilot/autopilot.cxx index 6d968b2de..2ae24a65a 100644 --- a/src/Autopilot/autopilot.cxx +++ b/src/Autopilot/autopilot.cxx @@ -120,7 +120,8 @@ static ComponentForge componentForge; Autopilot::Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode ) : _name("unnamed autopilot"), _serviceable(true), - _rootNode(rootNode) + _rootNode(rootNode), + SGSubsystemGroup("Autopilot") { if (componentForge.empty()) { diff --git a/src/Autopilot/autopilotgroup.hxx b/src/Autopilot/autopilotgroup.hxx index ef97927c1..b0885a47f 100644 --- a/src/Autopilot/autopilotgroup.hxx +++ b/src/Autopilot/autopilotgroup.hxx @@ -37,7 +37,7 @@ public: virtual void addAutopilot( const std::string & name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ) = 0; virtual void removeAutopilot( const std::string & name ) = 0; protected: - FGXMLAutopilotGroup() : SGSubsystemGroup() {} + FGXMLAutopilotGroup() : SGSubsystemGroup("FGXMLAutopilotGroup") {} }; diff --git a/src/Cockpit/cockpitDisplayManager.cxx b/src/Cockpit/cockpitDisplayManager.cxx index f1aa7063b..32d34af4e 100644 --- a/src/Cockpit/cockpitDisplayManager.cxx +++ b/src/Cockpit/cockpitDisplayManager.cxx @@ -42,7 +42,8 @@ namespace flightgear { CockpitDisplayManager::CockpitDisplayManager () -{ + : SGSubsystemGroup("CockpitDisplayManager") +{ } CockpitDisplayManager::~CockpitDisplayManager () diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index 49ec2258e..e18464bed 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -80,6 +80,7 @@ void FG3DCloudsListener::valueChanged( SGPropertyNode * node ) } FGEnvironmentMgr::FGEnvironmentMgr () : + SGSubsystemGroup("FGEnvironmentMgr"), _environment(new FGEnvironment()), fgClouds(nullptr), _cloudLayersDirty(true), diff --git a/src/Environment/terrainsampler.hxx b/src/Environment/terrainsampler.hxx index e9fa3c319..e56178392 100644 --- a/src/Environment/terrainsampler.hxx +++ b/src/Environment/terrainsampler.hxx @@ -29,6 +29,7 @@ namespace Environment { class TerrainSampler : public SGSubsystemGroup { public: + TerrainSampler() : SGSubsystemGroup("TerrainSampler") {} static TerrainSampler * createInstance( SGPropertyNode_ptr rootNode ); }; diff --git a/src/Input/input.cxx b/src/Input/input.cxx index d23ee30a4..171670bd6 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -60,7 +60,7 @@ //////////////////////////////////////////////////////////////////////// -FGInput::FGInput () +FGInput::FGInput () : SGSubsystemGroup("FGInput") { if( fgGetBool("/sim/input/no-mouse-input",false) ) { SG_LOG(SG_INPUT,SG_ALERT,"Mouse input disabled!"); diff --git a/src/Instrumentation/instrument_mgr.cxx b/src/Instrumentation/instrument_mgr.cxx index 74235f987..910575b3c 100644 --- a/src/Instrumentation/instrument_mgr.cxx +++ b/src/Instrumentation/instrument_mgr.cxx @@ -49,6 +49,7 @@ #include "tcas.hxx" FGInstrumentMgr::FGInstrumentMgr () : + SGSubsystemGroup("FGInstrumentMgr"), _explicitGps(false) { } diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index b2d09e703..d65547077 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -144,7 +144,7 @@ FGGlobals *globals = NULL; // Constructor FGGlobals::FGGlobals() : renderer( new FGRenderer ), - subsystem_mgr( new SGSubsystemMgr ), + subsystem_mgr( new SGSubsystemMgr("subsystem_mgr") ), event_mgr( new SGEventMgr ), sim_time_sec( 0.0 ), fg_root( "" ), diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 6298b6546..42072d65b 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -93,14 +93,19 @@ void FGNasalModuleListener::valueChanged(SGPropertyNode*) class TimerObj : public SGReferenced { public: - TimerObj(FGNasalSys* sys, naRef f, naRef self, double interval) : + TimerObj(Context *c, FGNasalSys* sys, naRef f, naRef self, double interval) : _sys(sys), _func(f), _self(self), _interval(interval) { char nm[128]; - snprintf(nm, 128, "nasal-timer-%p", this); + if (c) { + snprintf(nm, 128, "maketimer-%s:%d", naStr_data(naGetSourceFile(c, 0)), naGetLine(c, 0)); + } + else { + snprintf(nm, 128, "maketimer-%p", this); + } _name = nm; _gcRoot = naGCSave(f); _gcSelf = naGCSave(self); @@ -547,7 +552,7 @@ static naRef f_makeTimer(naContext c, naRef me, int argc, naRef* args) func = args[2]; } - TimerObj* timerObj = new TimerObj(nasalSys, func, self, args[0].num); + TimerObj* timerObj = new TimerObj(c, nasalSys, func, self, args[0].num); return nasal::to_nasal(c, timerObj); } @@ -1400,7 +1405,7 @@ void FGNasalSys::setTimer(naContext c, int argc, naRef* args) bool simtime = (argc > 2 && naTrue(args[2])) ? false : true; // A unique name for the timer based on the file name and line number of the function. - std::string name = "NasalTimer-"; + std::string name = "settimer-"; name.append(naStr_data(naGetSourceFile(c, 0))); name.append(":"); name.append(std::to_string(naGetLine(c, 0))); diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 7db1bcb33..a7b4ccf3d 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -28,7 +28,7 @@ #include "vacuum.hxx" -FGSystemMgr::FGSystemMgr () +FGSystemMgr::FGSystemMgr () :SGSubsystemGroup("FGSystemMgr") { SGPropertyNode_ptr config_props = new SGPropertyNode;