Changeset 6e3a44a in mainline
- Timestamp:
- 2009-07-21T22:18:49Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9ad5b5cc
- Parents:
- 5462a30
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r5462a30 r6e3a44a 84 84 static task_id_t task_id; 85 85 static loader_t *task_ldr; 86 static int task_wait_for; 86 87 87 88 /** Combination of events/data to print. */ … … 861 862 task_id = strtol(*argv, &err_p, 10); 862 863 task_ldr = NULL; 864 task_wait_for = 0; 863 865 if (*err_p) { 864 866 printf("Task ID syntax error\n"); … … 898 900 } 899 901 task_ldr = preload_task(*argv, argv, &task_id); 902 task_wait_for = 1; 900 903 901 904 return 0; … … 905 908 { 906 909 int rc; 910 task_exit_t texit; 911 int retval; 907 912 908 913 printf("System Call / IPC Tracer\n"); … … 924 929 printf("Connected to task %lld.\n", task_id); 925 930 926 if (task_ldr != NULL) {931 if (task_ldr != NULL) 927 932 program_run(); 928 }929 933 930 934 cev_fibril_start(); 931 935 trace_task(task_id); 932 936 937 if (task_wait_for) { 938 printf("Waiting for task to exit.\n"); 939 940 rc = task_wait(task_id, &texit, &retval); 941 if (rc != EOK) { 942 printf("Failed waiting for task.\n"); 943 return -1; 944 } 945 946 if (texit == TASK_EXIT_NORMAL) { 947 printf("Task exited normally, return value %d.\n", 948 retval); 949 } else { 950 printf("Task exited unexpectedly.\n"); 951 } 952 } 953 933 954 return 0; 934 955 }
Note:
See TracChangeset
for help on using the changeset viewer.