Ticket #2185: src_servers_debug_DebugServer.cpp.diff
File src_servers_debug_DebugServer.cpp.diff, 2.3 KB (added by , 16 years ago) |
---|
-
src/servers/debug/DebugServer.cpp
17 17 #include <Autolock.h> 18 18 #include <debug_support.h> 19 19 #include <Entry.h> 20 #include <FindDirectory.h> 20 21 #include <Invoker.h> 22 #include <Path.h> 21 23 22 24 #include <RegistrarDefs.h> 23 25 #include <RosterPrivate.h> … … 40 42 41 43 static const char *kSignature = "application/x-vnd.Haiku-debug_server"; 42 44 43 // paths to the apps used for debugging44 static const char *kConsoledPath = "/bin/consoled";45 static const char *kTerminalPath = "/boot/beos/apps/Terminal";46 static const char *kGDBPath = "/bin/gdb";47 45 48 49 46 // KillTeam 50 47 static void 51 48 KillTeam(team_id team, const char *appName = NULL) … … 444 441 char teamString[32]; 445 442 snprintf(teamString, sizeof(teamString), "--pid=%ld", fTeam); 446 443 447 const char *terminal = (debugInConsoled ? kConsoledPath : kTerminalPath); 444 BPath terminalPath; 445 error = find_directory(B_BEOS_APPS_DIRECTORY, &terminalPath); 446 if (error == B_OK) 447 error = terminalPath.Append("Terminal"); 448 448 449 if (error < B_OK) { 450 debug_printf("Composing the path failed! At %s, %s, %d.\n" 451 "Reason: %s\n", __FILE__, __PRETTY_FUNCTION__, __LINE__, 452 strerror(error)); 453 return error; 454 } 455 456 BPath consoledPath; 457 error = find_directory(B_BEOS_BIN_DIRECTORY, &consoledPath); 458 if (error == B_OK) 459 error = consoledPath.Append("consoled"); 460 461 if (error < B_OK) { 462 debug_printf("Composing the path failed! At %s, %s, %d.\n" 463 "Reason: %s\n", __FILE__, __PRETTY_FUNCTION__, __LINE__, 464 strerror(error)); 465 return error; 466 } 467 468 const char* terminal = debugInConsoled ? consoledPath.Path() 469 : terminalPath.Path(); 470 449 471 const char *argv[16]; 450 472 int argc = 0; 451 473 … … 459 481 argv[argc++] = windowTitle; 460 482 } 461 483 462 argv[argc++] = kGDBPath; 484 BPath gdbPath; 485 error = find_directory(B_BEOS_BIN_DIRECTORY, &gdbPath); 486 if (error == B_OK) 487 error = gdbPath.Append("gdb"); 488 489 if (error < B_OK) { 490 debug_printf("Composing the path failed! At %s, %s, %d.\n" 491 "Reason: %s\n", __FILE__, __PRETTY_FUNCTION__, __LINE__, 492 strerror(error)); 493 return error; 494 } 495 496 argv[argc++] = gdbPath.Path(); 463 497 argv[argc++] = teamString; 464 498 if (strlen(fExecutablePath) > 0) 465 499 argv[argc++] = fExecutablePath;