This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]