* Now dumps a message to the serial debug output in case a GUI server died; if the
registrar or the input_server died, you didn't get any notification before. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18970 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -567,7 +567,8 @@ TeamDebugHandler::_HandleMessage(DebugMessage *message)
|
|||||||
if (_IsGUIServer()) {
|
if (_IsGUIServer()) {
|
||||||
// App or input server. If it's the app server, we'll try to debug it.
|
// App or input server. If it's the app server, we'll try to debug it.
|
||||||
kill = !(_IsAppServer() && strlen(fExecutablePath) > 0);
|
kill = !(_IsAppServer() && strlen(fExecutablePath) > 0);
|
||||||
|
debug_printf("*** GUI server died: thread %ld, %s: %s\n", thread, fExecutablePath, buffer);
|
||||||
|
// TODO: for now, so that we know what's going on
|
||||||
} else if (USE_GUI && _AreGUIServersAlive() && _InitGUI() == B_OK) {
|
} else if (USE_GUI && _AreGUIServersAlive() && _InitGUI() == B_OK) {
|
||||||
// normal app
|
// normal app
|
||||||
|
|
||||||
@@ -767,7 +768,7 @@ TeamDebugHandler::_HandlerThread()
|
|||||||
kill = true;
|
kill = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message->Code() == B_DEBUGGER_MESSAGE_HANDED_OVER) {
|
if (message->Code() == B_DEBUGGER_MESSAGE_HANDED_OVER) {
|
||||||
// The team has successfully been handed over to the debugger.
|
// The team has successfully been handed over to the debugger.
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
@@ -790,9 +791,8 @@ TeamDebugHandler::_HandlerThread()
|
|||||||
terminate = true;
|
terminate = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete message;
|
delete message;
|
||||||
|
|
||||||
} while (!terminate);
|
} while (!terminate);
|
||||||
} else
|
} else
|
||||||
kill = true;
|
kill = true;
|
||||||
@@ -814,7 +814,7 @@ TeamDebugHandler::_HandlerThread()
|
|||||||
bool
|
bool
|
||||||
TeamDebugHandler::_ExecutableNameEquals(const char *name) const
|
TeamDebugHandler::_ExecutableNameEquals(const char *name) const
|
||||||
{
|
{
|
||||||
return (strcmp(_LastPathComponent(fExecutablePath), name) == 0);
|
return strcmp(_LastPathComponent(fExecutablePath), name) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// _IsAppServer
|
// _IsAppServer
|
||||||
@@ -843,7 +843,7 @@ bool
|
|||||||
TeamDebugHandler::_IsGUIServer() const
|
TeamDebugHandler::_IsGUIServer() const
|
||||||
{
|
{
|
||||||
// app or input server
|
// app or input server
|
||||||
return (_IsAppServer() || _IsInputServer() || _IsRegistrar());
|
return _IsAppServer() || _IsInputServer() || _IsRegistrar();
|
||||||
}
|
}
|
||||||
|
|
||||||
// _LastPathComponent
|
// _LastPathComponent
|
||||||
@@ -851,7 +851,7 @@ const char *
|
|||||||
TeamDebugHandler::_LastPathComponent(const char *path)
|
TeamDebugHandler::_LastPathComponent(const char *path)
|
||||||
{
|
{
|
||||||
const char *lastSlash = strrchr(path, '/');
|
const char *lastSlash = strrchr(path, '/');
|
||||||
return (lastSlash ? lastSlash + 1 : path);
|
return lastSlash ? lastSlash + 1 : path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// _FindTeam
|
// _FindTeam
|
||||||
@@ -876,8 +876,8 @@ TeamDebugHandler::_FindTeam(const char *name)
|
|||||||
bool
|
bool
|
||||||
TeamDebugHandler::_AreGUIServersAlive()
|
TeamDebugHandler::_AreGUIServersAlive()
|
||||||
{
|
{
|
||||||
return (_FindTeam("app_server") >= 0 && _FindTeam("input_server") >= 0
|
return _FindTeam("app_server") >= 0 && _FindTeam("input_server") >= 0
|
||||||
&& _FindTeam("registrar"));
|
&& _FindTeam("registrar");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user