Go to file
Pavel Labath 7d36d723ab DWARF: Add some support for non-native directory separators
Summary:
If we opened a file which was produced on system with different path
syntax, we would parse the paths from the debug info incorrectly.

The reason for that is that we would parse the paths as they were
native. For example this meant that on linux we would treat the entire
windows path as a single file name with no directory component, and then
we would concatenate that with the single directory component from the
DW_AT_comp_dir attribute. When parsing posix paths on windows, we would
at least get the directory separators right, but we still would treat
the posix paths as relative, and concatenate them where we shouldn't.

This patch attempts to remedy this by guessing the path syntax used in
each compile unit. (Unfortunately, there is no info in DWARF which would
give the definitive path style used by the produces, so guessing is all
we can do.) Currently, this guessing is based on the DW_AT_comp_dir
attribute of the compile unit, but this can be refined later if needed
(for example, the DW_AT_name of the compile unit may also contain some
useful info). This style is then used when parsing the line table of
that compile unit.

This patch is sufficient to make the line tables come out right, and
enable breakpoint setting by file name work correctly. Setting a
breakpoint by full path still has some kinks (specifically, using a
windows-style full path will not work on linux because the path will be
parsed as a linux path), but this will require larger changes in how
breakpoint setting works.

Reviewers: clayborg, zturner, JDevlieghere

Subscribers: aprantl, lldb-commits

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

llvm-svn: 351328
2019-01-16 12:30:41 +00:00
clang Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
clang-tools-extra Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
compiler-rt [TSan] Use switches when dealing with enums 2019-01-16 01:45:12 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Update year in license files 2019-01-15 15:10:32 +00:00
libcxx Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
libcxxabi Update year in license files 2019-01-15 15:10:32 +00:00
libunwind Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
lld [ELF] Implement option to force PIC compatible Thunks 2019-01-16 12:09:13 +00:00
lldb DWARF: Add some support for non-native directory separators 2019-01-16 12:30:41 +00:00
llgo Update year in license files 2019-01-15 15:10:32 +00:00
llvm Assertion in isAllocaPromotable due to extra bitcast goes into lifetime marker 2019-01-16 12:06:17 +00:00
openmp [OpenMP] Remove compiler warning about unused value 2019-01-16 11:35:11 +00:00
parallel-libs Update year in license files 2019-01-15 15:10:32 +00:00
polly Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
pstl Update year in license files 2019-01-15 15:10:32 +00:00
.arcconfig Add an .arcconfig for the top of the git monorepo. 2019-01-11 16:27:14 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.