Re: [PATCH 0/7] Adding startup files to GDB

Andrew Burgess
2021-01-11T16:45:32Z

* Tom Tromey <tom@tromey.com> [2020-10-22 13:02:07 -0600]:

> Andrew> Patch #4 adds the startup file support. Compared to Tom's original work:
> Andrew> (a) there's no auto saving of startup options,
>
> Andrew> (b) there's command line flag support for passing startup options
> Andrew> to GDB.
>
> Andrew> (c) there's support for a home directory and current working
> Andrew> directory startup file (only because this is basically free
> Andrew> given the restructuring of the code).
>
> Andrew> Patch #5 adds back the auto-save feature from Tom's series, however, I
> Andrew> have this off by default. I (personally) dislike the auto-save
> Andrew> feature, though I can see why some users might want it. I hope the
> Andrew> proposal I have here is might be a good middle ground.
>
> Could you say why you dislike it?
>
> The reason I did it the way I did is that I thought it was strange to
> have a command like "set startup-blah-blah off" that would be useless to
> use in a running gdb. It seemed to me that the name & intended use of
> the command implied auto-saving.
>
> Regardless of the choice here, I don't think it makes sense to have
> another option to control whether the first options are auto-saved.
> This is "feature to enable a feature" territory for me.

Tom,

I don't really understand how "feature to enable a feature" is
different from lots of the other features in GDB that have a feature
(setting) to enable them.

Are you just suggesting that auto-save should be on by default? If it
was on by default, but could be turned off with a setting, would this
be more acceptable to you?

Thanks,
Andrew