T tracer: add option to have both T traces and regular console logs

Use --T_stdout 2 to have both.

--T_stdout 0 is still the way to have only T traces and no console logs.
This commit is contained in:
Cedric Roux
2022-01-11 11:04:00 +01:00
parent 93f15bc99a
commit 0806734254
4 changed files with 14 additions and 9 deletions
+6 -1
View File
@@ -217,6 +217,11 @@ void T_Config_Init(void) {
sizeof(ttraceparams) / sizeof(paramdef_t),
NULL);
if (T_stdout == 0)
if (T_stdout < 0 || T_stdout > 2) {
printf("fatal error: T_stdout = %d but only values 0, 1, or 2 are allowed\n", T_stdout);
exit(1);
}
if (T_stdout == 0 || T_stdout == 2)
T_init(T_port, 1-T_nowait, T_dont_fork);
}