llvm-project/lldb/unittests
Greg Clayton 86188d8a40 Fix PathMappingList for relative and empty paths after recent FileSpec normalization changes
PathMappingList was broken for relative and empty paths after normalization changes in FileSpec. There were also no tests for PathMappingList so I added those.

Changes include:

Change PathMappingList::ReverseRemapPath() to take FileSpec objects instead of ConstString. The only client of this was doing work to convert to and from ConstString objects for no reason.
Normalize all paths prefix and replacements that are added to the PathMappingList vector so they match the paths that have been already normalized in the debug info
Unify code in the two forms of PathMappingList::RemapPath() so only one contains the actual functionality. Prior to this, there were two versions of this code.
Use FileSpec::AppendPathComponent() and remove a long standing TODO so paths are correctly appended to each other.
Added tests for absolute, relative and empty paths.

Differential Revision: https://reviews.llvm.org/D47021

llvm-svn: 332842
2018-05-21 14:14:36 +00:00
..
Breakpoint Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Core Fix narrowing warning by appending `f` to literal constant. 2018-04-19 18:31:57 +00:00
Editline Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Expression Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Host Conditionally compile a Darwin-only test. 2018-05-11 21:05:32 +00:00
Interpreter Move Args.cpp from Interpreter to Utility 2018-04-17 18:53:35 +00:00
Language CPlusPlusLanguage: Add unit tests for the FindAlternateFunctionManglings method 2018-05-10 08:59:17 +00:00
ObjectFile Add a comment explaining how the input for GetModuleSpecifications_EarlySectionHeaders was generated 2018-02-05 18:03:02 +00:00
Platform [CMake] Update unit tests with accurate dependencies 2017-02-01 22:17:00 +00:00
Process FileSpec: Remove PathSyntax enum and use llvm version instead 2018-05-14 14:52:47 +00:00
ScriptInterpreter Added new API to SBStructuredData class 2017-05-29 08:25:46 +00:00
Signals Make LLDB skip server-client roundtrip for signals that don't require any actions 2017-03-07 21:34:40 +00:00
Symbol Fix memory leak in TestClangASTContext.TestRecordHasFields 2018-01-22 18:56:33 +00:00
SymbolFile Revert "[SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it" 2018-01-22 11:51:56 +00:00
Target Fix PathMappingList for relative and empty paths after recent FileSpec normalization changes 2018-05-21 14:14:36 +00:00
TestingSupport cmake + xcode: prevent gtests from using includes from project root 2017-10-03 21:20:18 +00:00
UnwindAssembly [LLDB] Initial version of PPC64 InstEmulation 2018-02-27 18:42:46 +00:00
Utility Fix PathMappingList for relative and empty paths after recent FileSpec normalization changes 2018-05-21 14:14:36 +00:00
debugserver [CMake] Need to set WITH_LOCKDOWN on debugserver target 2017-09-06 20:15:43 +00:00
tools Reapply "Remove Process references from the Host module" 2018-05-15 13:42:26 +00:00
CMakeLists.txt [cmake, unittests] Fix the CMake file for the LLDB unittests to support multiple configurations 2018-05-09 19:58:51 +00:00
gtest_common.h [Windows] Remove the #include <eh.h> hack. 2017-03-03 20:21:59 +00:00