Debugger: Actually create the CLI, if requested
This commit is contained in:
@@ -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,20 +495,15 @@ 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) {
|
Debugger app;
|
||||||
// TODO: implement
|
status_t error = app.Init();
|
||||||
fprintf(stderr, "Error: Command line interface unimplemented\n");
|
if (error != B_OK) {
|
||||||
|
fprintf(stderr, "Error: Failed to init application: %s\n",
|
||||||
|
strerror(error));
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
|
||||||
Debugger app;
|
|
||||||
status_t error = app.Init();
|
|
||||||
if (error != B_OK) {
|
|
||||||
fprintf(stderr, "Error: Failed to init application: %s\n",
|
|
||||||
strerror(error));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
app.Run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.Run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user