This is an archive of the discontinued LLVM Phabricator instance.

LLDB Help Improvements
ClosedPublic

Authored by k8stone on Jan 13 2015, 3:58 PM.

Details

Reviewers
k8stone
Summary

Three changes to LLDB's help facility:

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

Diff Detail

Event Timeline

k8stone updated this revision to Diff 18118.Jan 13 2015, 3:58 PM
k8stone retitled this revision from to LLDB Help Improvements.
k8stone updated this object.
k8stone edited the test plan for this revision. (Show Details)
k8stone added a subscriber: Unknown Object (MLST).

I didn't look very closely at the line break logic in OutputFormattedHelpText but everything else looks good to me.

source/Interpreter/CommandInterpreter.cpp
1175

open curly brace for this block should be on a line by itself.

k8stone accepted this revision.Jan 14 2015, 4:58 PM
k8stone added a reviewer: k8stone.

Committed revision 226068 (including the one brace change suggested by Jason)

This revision is now accepted and ready to land.Jan 14 2015, 4:58 PM
k8stone closed this revision.Apr 27 2016, 10:54 AM

Long since complete.