summaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test_event
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-01-16 12:30:41 +0000
committerPavel Labath <pavel@labath.sk>2019-01-16 12:30:41 +0000
commit7fed798070f44a92026c93e8b58b53164f3d1596 (patch)
treec28c885d0ed7a8e75bea69eeba2801a87f14b06c /lldb/packages/Python/lldbsuite/test_event
parentc2ec4c18228e59c85b6a4ec7f56d1aa7a91767d1 (diff)
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test_event')
0 files changed, 0 insertions, 0 deletions