Re: [PATCH] add -s option to make -break-insert support dprintf

Tom Tromey
2013-05-10T15:24:09Z

Hui> + if (isprint(argv[0][i]))

Missing space before "(".

Hui> + char tmp[5];
Hui> + sprintf (tmp, "\\%o", (unsigned char)argv[0][i]);

Missing newline between these lines.
Missing space after ")".

Hui> + if (dprintf)
Hui> + {
Hui> + int format_num = oind + 1;
Hui> +
Hui> + if (hardware || tracepoint)
Hui> + error (_("-dprintf-insert: does not support -h or -a"));
Hui> + if (format_num >= argc)
Hui> + error (_("-dprintf-insert: Missing <format>"));
Hui> +
Hui> + extra_string = mi_argv_to_format (argv + format_num, argc - format_num);
Hui> + extra_string_cleanup = make_cleanup (xfree, extra_string);

It is better to just install an outer null cleanup and invoke that at
the end.

Tom