Debugger: Actually create the CLI, if requested

This commit is contained in:
Ingo Weinhold
2012-07-20 23:32:58 +02:00
parent af350aa218
commit 0f1f968ffb
+5 -8
View File
@@ -56,7 +56,7 @@ static const char* kUsage =
"\n" "\n"
"Options:\n" "Options:\n"
" -h, --help - Print this usage info and exit.\n" " -h, --help - Print this usage info and exit.\n"
" -c, --cli - Use command line user interface (not yet implemented)\n" " -c, --cli - Use command line user interface\n"
; ;
@@ -397,7 +397,8 @@ Debugger::ArgvReceived(int32 argc, char** argv)
return; return;
} }
start_team_debugger(team, &fSettingsManager, this, thread, stopInMain); start_team_debugger(team, &fSettingsManager, this, thread, stopInMain,
options.useCLI);
} }
@@ -481,6 +482,7 @@ Debugger::_FindTeamDebugger(team_id teamID) const
// #pragma mark - // #pragma mark -
int int
main(int argc, const char* const* argv) main(int argc, const char* const* argv)
{ {
@@ -493,11 +495,6 @@ main(int argc, const char* const* argv)
Options options; Options options;
parse_arguments(argc, argv, false, options); parse_arguments(argc, argv, false, options);
if (options.useCLI) {
// TODO: implement
fprintf(stderr, "Error: Command line interface unimplemented\n");
return 1;
} else {
Debugger app; Debugger app;
status_t error = app.Init(); status_t error = app.Init();
if (error != B_OK) { if (error != B_OK) {
@@ -507,6 +504,6 @@ main(int argc, const char* const* argv)
} }
app.Run(); app.Run();
}
return 0; return 0;
} }