summaryrefslogtreecommitdiffstats
path: root/tools/idevicedebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/idevicedebug.c')
-rw-r--r--tools/idevicedebug.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c
index b946d2c..66e997d 100644
--- a/tools/idevicedebug.c
+++ b/tools/idevicedebug.c
@@ -23,6 +23,8 @@
23#include <config.h> 23#include <config.h>
24#endif 24#endif
25 25
26#define TOOL_NAME "idevicedebug"
27
26#include <signal.h> 28#include <signal.h>
27#include <stdio.h> 29#include <stdio.h>
28#include <stdlib.h> 30#include <stdlib.h>
@@ -193,10 +195,11 @@ static void print_usage(int argc, char **argv)
193 printf(" run BUNDLEID [ARGS...]\trun app with BUNDLEID and optional ARGS on device.\n"); 195 printf(" run BUNDLEID [ARGS...]\trun app with BUNDLEID and optional ARGS on device.\n");
194 printf("\n"); 196 printf("\n");
195 printf("The following OPTIONS are accepted:\n"); 197 printf("The following OPTIONS are accepted:\n");
196 printf(" -e, --env NAME=VALUE\tset environment variable NAME to VALUE\n");
197 printf(" -u, --udid UDID\ttarget specific device by UDID\n"); 198 printf(" -u, --udid UDID\ttarget specific device by UDID\n");
199 printf(" -e, --env NAME=VALUE\tset environment variable NAME to VALUE\n");
198 printf(" -d, --debug\t\tenable communication debugging\n"); 200 printf(" -d, --debug\t\tenable communication debugging\n");
199 printf(" -h, --help\t\tprints usage information\n"); 201 printf(" -h, --help\t\tprints usage information\n");
202 printf(" -v, --version\t\tprints version information\n");
200 printf("\n"); 203 printf("\n");
201 printf("Homepage: <" PACKAGE_URL ">\n"); 204 printf("Homepage: <" PACKAGE_URL ">\n");
202 printf("Bug Reports: <" PACKAGE_BUGREPORT ">\n"); 205 printf("Bug Reports: <" PACKAGE_BUGREPORT ">\n");
@@ -265,6 +268,10 @@ int main(int argc, char *argv[])
265 print_usage(argc, argv); 268 print_usage(argc, argv);
266 res = 0; 269 res = 0;
267 goto cleanup; 270 goto cleanup;
271 } else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
272 printf("%s %s\n", TOOL_NAME, PACKAGE_VERSION);
273 res = 0;
274 goto cleanup;
268 } else if (!strcmp(argv[i], "run")) { 275 } else if (!strcmp(argv[i], "run")) {
269 cmd = CMD_RUN; 276 cmd = CMD_RUN;
270 277
@@ -313,7 +320,7 @@ int main(int argc, char *argv[])
313 case CMD_RUN: 320 case CMD_RUN:
314 default: 321 default:
315 /* get the path to the app and it's working directory */ 322 /* get the path to the app and it's working directory */
316 if (instproxy_client_start_service(device, &instproxy_client, "idevicerun") != INSTPROXY_E_SUCCESS) { 323 if (instproxy_client_start_service(device, &instproxy_client, TOOL_NAME) != INSTPROXY_E_SUCCESS) {
317 fprintf(stderr, "Could not start installation proxy service.\n"); 324 fprintf(stderr, "Could not start installation proxy service.\n");
318 goto cleanup; 325 goto cleanup;
319 } 326 }
@@ -334,7 +341,7 @@ int main(int argc, char *argv[])
334 } 341 }
335 342
336 /* start and connect to debugserver */ 343 /* start and connect to debugserver */
337 if (debugserver_client_start_service(device, &debugserver_client, "idevicerun") != DEBUGSERVER_E_SUCCESS) { 344 if (debugserver_client_start_service(device, &debugserver_client, TOOL_NAME) != DEBUGSERVER_E_SUCCESS) {
338 fprintf(stderr, 345 fprintf(stderr,
339 "Could not start com.apple.debugserver!\n" 346 "Could not start com.apple.debugserver!\n"
340 "Please make sure to mount the developer disk image first:\n" 347 "Please make sure to mount the developer disk image first:\n"