Re: [PATCH v3 2/2] compile: Add 'set compile-gcc'

Pedro Alves
2015-04-27T15:47:47Z

On 04/23/2015 10:08 PM, Jan Kratochvil wrote:

> @@ -688,4 +704,14 @@ String quoting is parsed like in shell, for example:\n\
> " -fno-stack-protector"
> );
> set_compile_args (compile_args, 0, NULL);
> +
> + add_setshow_filename_cmd ("compile-gcc", class_support,
> + &compile_gcc,
> + _("Set compile command GCC driver filename"),
> + _("Show compile command GCC driver filename"),
> + _("\
> +It should be absolute pathname to the gcc executable.\n\
> +If empty the default target triplet will be searched in $PATH."),
> + NULL, show_compile_gcc, &setlist, &showlist);
> + compile_gcc = xstrdup ("");

...

> +@table @code
> +@item set compile-gcc
> +@cindex compile command driver filename override
> +Set compilation command used for compiling and injecting code with the
> +@code{compile} commands. If this option is not set (it is set to
> +an empty string), the search described above will occur --- that is the
> +default.
> +

IIUC, gdb will always apply the same search as when this is set
empty? That is, the user can also set this to a regex. So it seems to me
that the documentation (manual and help) doesn't match the implementation?

Thanks,
Pedro Alves