[Lldb-commits] [PATCH] D11357: Resolve DW_AT_comp_dir path if it contains a symlink

Greg Clayton clayborg at gmail.com
Tue Jul 28 09:01:11 PDT 2015


clayborg added a comment.

So a few rules that we must follow:

- lldb_private::Module and the contained lldb_private::ObjectFile and lldb_private::SymbolVendor/lldb_private::SymbolFile are never associated with a Target or Process unless they are loaded from memory and there is no backing file. This would be the typical way to get a platform, but that options isn't available. Why? We put all modules into a global cache that means multiple processes can all use the same module for libc.so. So there can be no ties to a target/process in any fix we do.
- Since we have no target/process we must rely on static function calls in the platforms or settings to fix this. One option is to make a setting, something like "plugin.symbol-file.dwarf.symlink-paths" which could be an array that could contain these items. This would allow people to add new ones, but this doesn't limit the checks to linux only. The setting could be a dictionary where the key is a triple (like "*-*-linux") and the value is a string which is the path to convert.
- Another option is to find the platform by using the triple from the symbol file and then asking the platform for the list to use.

I think I like the last option, but this options doesn't guarantee that we get the Platform that you might have created for your process.


http://reviews.llvm.org/D11357







More information about the lldb-commits mailing list