diff options
author | Kate Stone <katherine.stone@apple.com> | 2015-01-15 00:52:41 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2015-01-15 00:52:41 +0000 |
commit | a487aa4cdbd37b9d6f53532971415bb1f5c45b23 (patch) | |
tree | 79d8a36e2feed75990c050cad8492cc93e6fc803 /lldb/source/Commands/CommandObjectHelp.h | |
parent | 64e033f9c4fb5a241496753f7ffcbddaa0153e5b (diff) | |
download | bcm5719-llvm-a487aa4cdbd37b9d6f53532971415bb1f5c45b23.tar.gz bcm5719-llvm-a487aa4cdbd37b9d6f53532971415bb1f5c45b23.zip |
Three related changes to help:
The default help display now shows the alias collection by default, and hides commands whose named begin with an underscore. Help is primarily useful to those unfamiliar with LLDB and should aim to answer typical questions while still being able to provide more esoteric answers when required. To that latter end an argument to include the hidden commands in help has been added, and instead of having a help flag to show aliases there is now one to hide them. This final change might be controversial as it repurposes the -a shorthand as the opposite of its original meaning.
The previous implementation of OutputFormattedHelpText was easily confused by embedded newlines. The new algorithm correctly breaks on the FIRST newline or LAST space/tab before the target column count rather than treating all whitespace interchangeably.
Command interpreters now have the ability to specify help prologue text and a command prefix string. Neither are used in the current LLDB sources but are required to support REPL-like extensions where LLDB commands must be prefixed and additional help text is required to explain how to access traditional debugging commands.
<rdar://problem/17751929>
<rdar://problem/16953815>
<rdar://problem/16953841>
<rdar://problem/16930173>
<rdar://problem/16879028>
llvm-svn: 226068
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.h')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h index 6e8f9d4cbc7..7db659c472c 100644 --- a/lldb/source/Commands/CommandObjectHelp.h +++ b/lldb/source/Commands/CommandObjectHelp.h @@ -62,11 +62,14 @@ public: switch (short_option) { case 'a': - m_show_aliases = true; + m_show_aliases = false; break; case 'u': m_show_user_defined = false; break; + case 'h': + m_show_hidden = true; + break; default: error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option); break; @@ -78,8 +81,9 @@ public: void OptionParsingStarting () { - m_show_aliases = false; + m_show_aliases = true; m_show_user_defined = true; + m_show_hidden = false; } const OptionDefinition* @@ -95,7 +99,8 @@ public: // Instance variables to hold the values for command options. bool m_show_aliases; - bool m_show_user_defined; + bool m_show_user_defined; + bool m_show_hidden; }; virtual Options * |