[Lldb-commits] [PATCH] D54692: [Driver] Use libOption with tablegen.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 27 06:55:15 PST 2018


labath added inline comments.


================
Comment at: tools/driver/Driver.cpp:876-888
+  usage << indent << tool_name
+        << " -a <arch> -f <filename> [-c <filename>] [-s <filename>] [-o "
+           "<none>] [-S <filename>] [-O <none>] [-k <none>] [-K <filename>] "
+           "[-Q] [-b] [-e] [-x] [-X] [-l <script-language>] [-d] [-z "
+           "<filename>] [[--] <PROGRAM-ARG-1> [<PROGRAM_ARG-2> ...]]\n";
+  usage << indent << tool_name
+        << " -n <process-name> -w [-s <filename>] [-o <none>] [-S "
----------------
I am not entirely thrilled by the hard-coding of the option combinations here. It sounds like the kind of thing that will invariably get out of sync (I think it would be better to just not have it). Instead of trying to exhaustively list all possible option combinations (which I generally find too long to make sense of), and still getting it wrong (Why is there a `[[--] <PROGRAM-ARG-1> [<PROGRAM_ARG-2> ...]]` after `-v` in the second option form?), maybe it would be better to just output a short prose here explaining the general principle. Maybe something like "LLDB can be started in several modes. Passing an executable as a positional arguments prepares lldb to debug the given executable. Using one of the attach options causes lldb to immediately attach to the given process. Command options can be combined with either mode and cause lldb to run the specified commands before starting the interactive shell. Using --repl starts lldb in REPL mode. etc."

However, if everyone is happy with the current approach then I won't stand in the way..


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54692/new/

https://reviews.llvm.org/D54692





More information about the lldb-commits mailing list