From d9d63369dfd1b31e0eb89ce38d6be12cffdb7274 Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Tue, 7 Dec 2010 19:58:26 +0000 Subject: - Fix alias-building & resolving to properly handle optional arguments for command options. - Add logging for command resolution ('log enable lldb commands') - Fix alias resolution to properly handle commands that take raw input (resolve the alias, but don't muck up the raw arguments). Net result: Among other things, 'expr' command can now take strings with escaped characters and not have the command handling & alias resolution code muck up the escaped characters. E.g. 'expr printf ("\n\n\tHello there!")' should now work properly. Not working yet: Creating aliases with raw input for commands that take raw input. Working on that. e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet. llvm-svn: 121171 --- lldb/source/Commands/CommandObjectHelp.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Commands/CommandObjectHelp.cpp') diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index 416bdd542ba3..98fe2ad58c2e 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -146,6 +146,10 @@ CommandObjectHelp::Execute (Args& command, CommandReturnObject &result) && (strlen (long_help) > 0)) output_strm.Printf ("\n%s", long_help); // Mark this help command with a success status. + if (sub_cmd_obj->WantsRawCommandString()) + { + m_interpreter.OutputFormattedHelpText (output_strm, "", "", "\nIMPORTANT NOTE: Because this command takes 'raw' input, if you use any command options you must use ' -- ' between the end of the command options and the beginning of the raw input.", 1); + } result.SetStatus (eReturnStatusSuccessFinishNoResult); } else if (sub_cmd_obj->IsMultiwordObject()) -- cgit v1.2.3