diff options
author | Greg Clayton <gclayton@apple.com> | 2010-07-09 20:39:50 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-07-09 20:39:50 +0000 |
commit | c982c768d248b21b82fbd70b61a4cc824cd82ddc (patch) | |
tree | 68c5d417ce51994a2d393e5a5a7f0025b6e4ed35 /lldb/source/Commands/CommandObjectSyntax.cpp | |
parent | 2a5725b1a324639d0e16e9c125f5713acfabca60 (diff) | |
download | bcm5719-llvm-c982c768d248b21b82fbd70b61a4cc824cd82ddc.tar.gz bcm5719-llvm-c982c768d248b21b82fbd70b61a4cc824cd82ddc.zip |
Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.
llvm-svn: 108009
Diffstat (limited to 'lldb/source/Commands/CommandObjectSyntax.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectSyntax.cpp | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/lldb/source/Commands/CommandObjectSyntax.cpp b/lldb/source/Commands/CommandObjectSyntax.cpp index 3279da2c1d6..072ae29777e 100644 --- a/lldb/source/Commands/CommandObjectSyntax.cpp +++ b/lldb/source/Commands/CommandObjectSyntax.cpp @@ -40,62 +40,20 @@ CommandObjectSyntax::~CommandObjectSyntax() bool -CommandObjectSyntax::OldExecute +CommandObjectSyntax::Execute ( + CommandInterpreter &interpreter, Args& command, - Debugger *context, - CommandInterpreter *interpreter, CommandReturnObject &result ) { - CommandObject *cmd_obj; - - if (command.GetArgumentCount() != 0) - { - cmd_obj = interpreter->GetCommandObject(command.GetArgumentAtIndex(0)); - if (cmd_obj) - { - Stream &output_strm = result.GetOutputStream(); - if (cmd_obj->GetOptions() != NULL) - { - output_strm.Printf ("\nSyntax: %s\n", cmd_obj->GetSyntax()); - //cmd_obj->GetOptions()->GenerateOptionUsage (output_strm, cmd_obj); - output_strm.Printf ("(Try 'help %s' for more information on command options syntax.)\n", - cmd_obj->GetCommandName()); - result.SetStatus (eReturnStatusSuccessFinishNoResult); - } - else - { - output_strm.Printf ("\nSyntax: %s\n", cmd_obj->GetSyntax()); - result.SetStatus (eReturnStatusSuccessFinishNoResult); - } - } - else - { - result.AppendErrorWithFormat ("'%s' is not a known command.\n", command.GetArgumentAtIndex(0)); - result.AppendError ("Try 'help' to see a current list of commands."); - result.SetStatus (eReturnStatusFailed); - } - } - else - { - result.AppendError ("Must call 'syntax' with a valid command."); - result.SetStatus (eReturnStatusFailed); - } - return result.Succeeded(); -} - -bool -CommandObjectSyntax::Execute (Args &command, Debugger *context, CommandInterpreter *interpreter, - CommandReturnObject &result) -{ CommandObject::CommandMap::iterator pos; CommandObject *cmd_obj; const int argc = command.GetArgumentCount(); if (argc > 0) { - cmd_obj = interpreter->GetCommandObject (command.GetArgumentAtIndex(0)); + cmd_obj = interpreter.GetCommandObject (command.GetArgumentAtIndex(0)); bool all_okay = true; for (int i = 1; i < argc; ++i) { |