This is an archive of the discontinued LLVM Phabricator instance.

[Docs] Generate the LLDB man page with Sphinx
ClosedPublic

Authored by JDevlieghere on Nov 20 2019, 2:57 PM.

Details

Summary

This patch replaces the existing out-of-date man page for lldb and
replaces it with an RST file from which sphinx generates the actual
troff file. This is similar to how man pages are generated for the rest
of the LLVM utilities.

The man page is generated by building the docs-lldb-man target.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

JDevlieghere created this revision.Nov 20 2019, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2019, 2:57 PM
Herald added a subscriber: abidh. · View Herald Transcript

Here's what the output looks like: https://reviews.llvm.org/P8170

$ ninja docs-lldb-man
[1/1] Generating man Sphinx documentation for lldb into "/Volumes/Jonas/llvm/build-ra/tools/lldb/docs/man"
$ nroff -man  /Volumes/Jonas/llvm/build-ra/tools/lldb/docs/man/LLDB.1 | col -bx

Fix inconsistent newlines.

aprantl accepted this revision.Nov 20 2019, 3:18 PM

Very nice!

lldb/docs/man/lldb.rst
17

While this is technically correct, as an end-user this makes me wonder if I picked the wrong command when I'm looking for the debugger.

How about:

lldb is a fully featured debugger. It is a command line interface to the LLDB debugger library.

291

CONFIGURATION FILES ?

This revision is now accepted and ready to land.Nov 20 2019, 3:18 PM
JDevlieghere marked 2 inline comments as done.

Address Adrian's comments.

jingham added inline comments.
lldb/docs/man/lldb.rst
306

This isn't quite right. The actual rule is:

If the lldb library is loaded into an executable called Foo, lldb will first look for ~/.lldbinit-Foo, and if that exists will load and otherwise it will fall back on ~/.lldbinit. That goes for any executable.

Also, if we find ~/.lldbinit-<EXECUTABLE> we don't read the ~/.lldbinit.

There is special handling for Xcode, because when using Xcode the lldb library is actually loaded into a binary called lldb-rpc-server. So there's a little hack where IF the program happens to be lldb-rpc-server, we try .lldbinit-Xcode.

Update configuration file section.

JDevlieghere marked an inline comment as done.Nov 20 2019, 4:17 PM
jingham added inline comments.Nov 20 2019, 4:38 PM
lldb/docs/man/lldb.rst
81

This is probably wrong in the lldb help too - copy paste most likely. But the value of -one-line-on-crash is a command not a file...

Fix description for one-line-on-crash

JDevlieghere marked an inline comment as done.Nov 20 2019, 4:50 PM
labath accepted this revision.Nov 21 2019, 1:41 AM

LGTM. Unless you're interested in tablegening the command line option list, that is. :)

LGTM. Unless you're interested in tablegening the command line option list, that is. :)

I considered it, but maybe that's something for the thanksgiving break ;-)

This revision was automatically updated to reflect the committed changes.
lldb/docs/CMakeLists.txt