Always allow debugging a team, even if it wasn't possible to get its
executable path. It seems, gdb doesn't produce very helpful stack traces then, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21915 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5c806b5dbc
commit
ac7fc18b09
@ -441,7 +441,7 @@ TeamDebugHandler::_EnterDebugger()
|
||||
|
||||
// prepare the argument vector
|
||||
char teamString[32];
|
||||
snprintf(teamString, sizeof(teamString), "%ld", fTeam);
|
||||
snprintf(teamString, sizeof(teamString), "--pid=%ld", fTeam);
|
||||
|
||||
const char *terminal = (debugInConsoled ? kConsoledPath : kTerminalPath);
|
||||
|
||||
@ -459,8 +459,9 @@ TeamDebugHandler::_EnterDebugger()
|
||||
}
|
||||
|
||||
argv[argc++] = kGDBPath;
|
||||
argv[argc++] = fExecutablePath;
|
||||
argv[argc++] = teamString;
|
||||
if (strlen(fExecutablePath) > 0)
|
||||
argv[argc++] = fExecutablePath;
|
||||
argv[argc] = NULL;
|
||||
|
||||
// start the terminal
|
||||
@ -553,10 +554,9 @@ TeamDebugHandler::_HandleMessage(DebugMessage *message)
|
||||
// ask the user whether to debug or kill the team
|
||||
if (_IsGUIServer()) {
|
||||
// App server, input server, or registrar. We always debug those.
|
||||
kill = !(strlen(fExecutablePath) > 0);
|
||||
kill = false;
|
||||
} else if (USE_GUI && _AreGUIServersAlive() && _InitGUI() == B_OK) {
|
||||
// normal app
|
||||
|
||||
// normal app -- tell the user
|
||||
_NotifyAppServer(fTeam);
|
||||
|
||||
char buffer[1024];
|
||||
@ -564,18 +564,10 @@ TeamDebugHandler::_HandleMessage(DebugMessage *message)
|
||||
"has encountered an error which prevents it from continuing. Haiku "
|
||||
"will terminate the application and clean up.", fTeamInfo.args);
|
||||
|
||||
if (strlen(fExecutablePath) > 0) {
|
||||
// we have a usable path, so we can debug the team
|
||||
BAlert *alert = new BAlert(NULL, buffer, "Debug", "OK", NULL,
|
||||
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
int32 result = alert->Go();
|
||||
kill = (result == 1);
|
||||
} else {
|
||||
// no usable path
|
||||
BAlert *alert = new BAlert(NULL, buffer, "OK", NULL, NULL,
|
||||
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
alert->Go();
|
||||
}
|
||||
BAlert *alert = new BAlert(NULL, buffer, "Debug", "OK", NULL,
|
||||
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
int32 result = alert->Go();
|
||||
kill = (result == 1);
|
||||
}
|
||||
|
||||
return kill;
|
||||
|
Loading…
Reference in New Issue
Block a user