Re: [PATCH] gdb/gdbsupport: Use LOCALAPPDATA for index cache on windows

Christian Biesinger via Gdb-patches
2020-12-09T12:46:11Z

On Wed, Dec 9, 2020 at 10:15 AM Alexander Fedotov via Gdb-patches
<gdb-patches@sourceware.org> wrote:
>
> On Tue, Dec 8, 2020 at 6:31 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > Date: Tue, 8 Dec 2020 09:46:47 -0500
> > > From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
> > >
> > >
> > > My only question is about:
> > >
> > > return string_printf ("%s/" HOME_CACHE_DIR "/gdb", abs.get ());
> > >
> > > That would give a final path like:
> > >
> > > C:\Users\Simon\AppData\Local\.cache\gdb
> > >
> > > The ".cache" part is not typical in this directory. Should we instead
> > > just have:
> > >
> > > C:\Users\Simon\AppData\Local\gdb
> > >
> > > ?
> >
> > IMO, it indeed should be in C:\Users\Simon\AppData\Local\gdb, as other
> > applications do. Moreover, I think we should use APPDATA, not
> > LOCALAPPDATA, because it makes sense to be able to synchronize the
> > cache over the network if the computer joins some domain. IOW, it
> > isn't necessarily local data, is it?
> IMO default behaviour should be restrictive and store user data
> locally. If necessary user
> can specify folder using .gdbinit or by commands explicitly.
> I guess such a roaming user keeping his project under version control
> along with makefiles
> and .gdbinit.

Is this only used for the index cache or also for other things? The
index cache probably makes sense to be in Local, since it can be
relatively big and caches should generally not roam. Other things may
make more sense in the roaming part (e.g. settings).

https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh464917(v=win.10)?redirectedfrom=MSDN
does say "The OS limits the size of the app data that each app may
roam".

Christian