[PATCH] D68156: [debugserver] Add --version/-V command line option to debugserver.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 14:28:32 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL373127: [debugserver] Add --version/-V command line option to debugserver. (authored by JDevlieghere, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D68156?vs=222246&id=222248#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68156/new/
https://reviews.llvm.org/D68156
Files:
lldb/trunk/tools/debugserver/source/debugserver.cpp
Index: lldb/trunk/tools/debugserver/source/debugserver.cpp
===================================================================
--- lldb/trunk/tools/debugserver/source/debugserver.cpp
+++ lldb/trunk/tools/debugserver/source/debugserver.cpp
@@ -789,6 +789,12 @@
::fflush((FILE *)baton);
}
+void show_version_and_exit(int exit_code) {
+ printf("%s-%s for %s.\n", DEBUGSERVER_PROGRAM_NAME, DEBUGSERVER_VERSION_STR,
+ RNB_ARCH);
+ exit(exit_code);
+}
+
void show_usage_and_exit(int exit_code) {
RNBLogSTDERR(
"Usage:\n %s host:port [program-name program-arg1 program-arg2 ...]\n",
@@ -811,6 +817,7 @@
{"debug", no_argument, NULL, 'g'},
{"kill-on-error", no_argument, NULL, 'K'},
{"verbose", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
{"lockdown", no_argument, &g_lockdown_opt, 1}, // short option "-k"
{"applist", no_argument, &g_applist_opt, 1}, // short option "-t"
{"log-file", required_argument, NULL, 'l'},
@@ -1173,6 +1180,10 @@
DNBLogSetVerbose(1);
break;
+ case 'V':
+ show_version_and_exit(0);
+ break;
+
case 's':
ctx.GetSTDIN().assign(optarg);
ctx.GetSTDOUT().assign(optarg);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68156.222248.patch
Type: text/x-patch
Size: 1214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190927/9a014789/attachment.bin>
More information about the llvm-commits
mailing list