When using "pipe", also use log_output to redirect the log
output to a file so as not to flood the stdin/out pipes.
-The -p/--pipe option is deprecated and a warning is printed
-as it is equivalent to passing in -c "gdb_port pipe; log_output openocd.log".
-
Any other string is interpreted as named pipe to listen to.
Output pipe is the same name as input pipe, but with 'o' appended,
e.g. /var/gdb, /var/gdbo.
{"search", required_argument, 0, 's'},
{"log_output", required_argument, 0, 'l'},
{"command", required_argument, 0, 'c'},
- {"pipe", no_argument, 0, 'p'},
{0, 0, 0, 0}
};
/* getopt_long stores the option index here. */
int option_index = 0;
- c = getopt_long(argc, argv, "hvd::l:f:s:c:p", long_options, &option_index);
+ c = getopt_long(argc, argv, "hvd::l:f:s:c:", long_options, &option_index);
/* Detect the end of the options. */
if (c == -1)
if (optarg)
add_config_command(optarg);
break;
- case 'p':
- /* to replicate the old syntax this needs to be synchronous
- * otherwise the gdb stdin will overflow with the warning message */
- command_run_line(cmd_ctx, "gdb_port pipe; log_output openocd.log");
- LOG_WARNING("deprecated option: -p/--pipe. Use '-c \"gdb_port pipe; "
- "log_output openocd.log\"' instead.");
- break;
default: /* '?' */
/* getopt will emit an error message, all we have to do is bail. */
return ERROR_FAIL;