Re: [EXT] Re: Slow "symbol-file" when using GDB 12.1 on Windows hosts
Luis Machado via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 3/20/23 13:58, Eli Zaretskii wrote: >> From: Adrian Oltean <[email protected]> >> CC: "[email protected]" <[email protected]>, "[email protected]" >> <[email protected]> >> Date: Mon, 20 Mar 2023 13:33:49 +0000 >> >> These were the questions: >> 1. Is GDB trying to find debug symbols in all those folders? Or what's with them? >> 2. What is the code from GDB that artificially builds all those paths? >> 3. GDB 10.2 does not seem to access "C:\Windows\CSC\v2.0.6\namespace\lib", nor >> "\\lib\debug\Users\MyUsername\...". Is this related to a recent change? Can someone >> point to the relevant change in this case? >> 4. Is there a command to stop GDB from attempting to access those files/folders? > > Sorry, I don't know the answers. Maybe Luis or someone else does. > > In general, AFAIK GDB searches directories recorded in the program's > debug info, and also some source directories. See the node "Source > Path" in the GDB manual. Also try "show solib-search-path". The > "show libthread-db-search-path" command could also be relevant; see > "Threads" in the manual. The logic to lookup debug info is OS-invariant I think, but gdb does have to adjust to the Windows-style paths. With that said, most of the attempts gdb does at accessing directories is an attempt to locate separate debug info files or simply to locate shared library symbol files. Since there is quite a bit of variation in terms of where an OS puts those files, gdb has to use heuristics to try to determine those directories, so it will try to access gdb-generated paths sometimes. It shouldn't slow things down though, as it is mostly a file open/close request.