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

Simon Marchi via Gdb-patches
2020-12-08T14:46:58Z

On 2020-12-08 5:16 a.m., Alexander Fedotov via Gdb-patches wrote:
> Hi all
>
> When running GDB on Windows using native command line (not Msys2 or
> another) I see nasty warning Couldn't determine a path for index
> cached directory"
>
> So I have decided to use LOCALAPPDATA as a last resort.
>
> Comments are welcomed.
>
> Alex
>

Hi Alex,

I made a few changes to your patch:

- I adjusted you comment message a little bit and added a ChangeLog entry
- I Changed "#ifdef _WIN32" to "#ifdef WIN32", because we use the latter
a few lines below.

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

?

Simon