[Bug 26188] New: FileSpec::RemoveBackupDots should also remove single dots

Bug ID 26188
Summary FileSpec::RemoveBackupDots should also remove single dots
Product lldb
Version 3.8
Hardware PC
OS Windows XP
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter vadimcn@gmail.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

A breakpoint being set in file C:\foo\bar.c won't match a compile unit with
DW_AT_comp_dir=C:\foo and DW_AT_name=.\bar.c 

I've discovered this by debugging LLDB while trying to figure out why wouldn't
it set a breakpoint by full file path+line.  It seems that the compile unit
path gets transformed into a FileSpec { m_directory="c:\foo\.",
m_filename="bar.c" ... }, and that trailing dot prevents a match.  One way to
fix this would be to teach FileSpec::RemoveBackupDots to strip single dots from
paths, since they don't add anything semantically.