[LLDB][NativePDB] Convert backslash to slash when creating CU and filter out CU with...
authorZequan Wu <zequanwu@google.com>
Mon, 13 Jun 2022 18:53:38 +0000 (11:53 -0700)
committerZequan Wu <zequanwu@google.com>
Mon, 13 Jun 2022 19:04:25 +0000 (12:04 -0700)
commit3222f95ea8c4de153f908c138cdec178e22acaf4
tree6fde2ab49789bf7e7dcde35ac140dff9b783493d
parentd4245ed67ce44188714e6b29a0b45e860619bcf2
[LLDB][NativePDB] Convert backslash to slash when creating CU and filter out CU with no function in ResolveSymbolContext.

On Windows, when compile with -fdebug-compilation-dir which contains slash, the source file path in PDB will look like "../tmp\file.cc" because the path separator used is determined by target machine. Converting backslash to slash helps lldb to find the CU in ResolveSymbolContext.

We want to filter out CU with no function in ResolveSymbolContext as a cpp file will have two debug info modules in PDB if built with thinlto and one of them is a skeleton with no function debug info.
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp