Re: [PATCH v2 5/7] Add early startup command file

Tom Tromey
2020-07-05T18:51:34Z

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> This adds support for a gdb command file to be read early in startup.
Tom> Code that wants to save an early setting can register a callback to be
Tom> called to write to this file. This code is not yet used, but will be
Tom> in subsequent patches.

Tom> +/* See cli-setshow.h. */
Tom> +
Tom> +void
Tom> +write_startup_file ()
Tom> +{
[...]
Tom> +
Tom> + for (auto &callback : write_startup_functions)
Tom> + callback (&outfile);

I'm going to change this to add a comment to the file as well. The
comment will say something about how the file is generated by gdb and
that its contents may be ovewritten.

Tom