summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/Options.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-01-04 19:11:25 +0000
committerSean Callanan <scallanan@apple.com>2012-01-04 19:11:25 +0000
commita4c6ad191417112dae453d3b9313aff6c5bb18f7 (patch)
tree592a13dd1d38da69ad6b75bd294df148489c7cea /lldb/source/Interpreter/Options.cpp
parent06d3d01295cfa1e22bf46caf35e6fd4e4d286607 (diff)
downloadbcm5719-llvm-a4c6ad191417112dae453d3b9313aff6c5bb18f7.tar.gz
bcm5719-llvm-a4c6ad191417112dae453d3b9313aff6c5bb18f7.zip
Fixed the help text for raw commands like "expr"
to include -- in sample command lines. Now LLDB prints expression [-f <format>] -- <expr> instead of expression [-f <format>] <expr> and also adds a new example line: expression <expr> to show that in the absense of arguments the -- can be ommitted. llvm-svn: 147540
Diffstat (limited to 'lldb/source/Interpreter/Options.cpp')
-rw-r--r--lldb/source/Interpreter/Options.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp
index dbe65798be8..09b17a8eb25 100644
--- a/lldb/source/Interpreter/Options.cpp
+++ b/lldb/source/Interpreter/Options.cpp
@@ -555,9 +555,24 @@ Options::GenerateOptionUsage
}
}
}
+
if (arguments_str.GetSize() > 0)
+ {
+ if (cmd->WantsRawCommandString())
+ strm.Printf(" --");
+
strm.Printf (" %s", arguments_str.GetData());
+ }
}
+
+ if (cmd->WantsRawCommandString() &&
+ arguments_str.GetSize() > 0)
+ {
+ strm.PutChar('\n');
+ strm.Indent(name);
+ strm.Printf(" %s", arguments_str.GetData());
+ }
+
strm.Printf ("\n\n");
// Now print out all the detailed information about the various options: long form, short form and help text:
OpenPOWER on IntegriCloud