Summary: This adds support for auto-detection of path style to SymbolFileBreakpad (similar to how r351328 did the same for DWARF). We guess each file entry separately, as we have no idea which file came from which compile units (and different compile units can have different path styles). The breakpad generates should have already converted the paths to absolute ones, so this guess should be reasonable accurate, but as always with these kinds of things, it is hard to give guarantees about anything. In an attempt to bring some unity to the path guessing logic, I move the guessing logic from inside SymbolFileDWARF into the FileSpec class and have both symbol files use it to implent their desired behavior. Reviewers: clayborg, lemo, JDevlieghere Subscribers: aprantl, markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D57895 llvm-svn: 353702
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table.out
|
|
# RUN: %lldb %T/line-table.out -o "target symbols add -s line-table.out %S/Inputs/line-table.syms" \
|
|
# RUN: -s %s -o exit | FileCheck %s
|
|
|
|
# We create a compile unit for each function. The compile unit name is the first
|
|
# line table entry in that function.
|
|
# This symbol file contains a single function in the "compile unit" a.c. This
|
|
# function has two line table sequences.
|
|
image dump line-table a.c
|
|
# CHECK-LABEL: Line table for /tmp/a.c
|
|
# CHECK-NEXT: 0x00000000004000b0: /tmp/a.c:1
|
|
# CHECK-NEXT: 0x00000000004000b1: /tmp/a.c:2
|
|
# CHECK-NEXT: 0x00000000004000b2: /tmp/c.c:2
|
|
# CHECK-NEXT: 0x00000000004000b3:
|
|
# CHECK-EMPTY:
|
|
# CHECK-NEXT: 0x00000000004000b4: /tmp/c.c:3
|
|
# CHECK-NEXT: 0x00000000004000b5:
|
|
# CHECK-EMPTY:
|
|
|
|
# Single compile unit for c.c with a single line sequence.
|
|
image dump line-table c.c
|
|
# CHECK-LABEL: Line table for /tmp/c.c
|
|
# CHECK-NEXT: 0x00000000004000c0: /tmp/c.c:1
|
|
# CHECK-NEXT: 0x00000000004000c2: /tmp/a.c:2
|
|
# CHECK-NEXT: 0x00000000004000c4:
|
|
# CHECK-EMPTY:
|
|
|
|
# There are two compile units called "d.c". Hence, two line tables.
|
|
image dump line-table d.c
|
|
# CHECK-LABEL: Line table for /tmp/d.c
|
|
# CHECK-NEXT: 0x00000000004000d0: /tmp/d.c:1
|
|
# CHECK-NEXT: 0x00000000004000d2:
|
|
# CHECK-EMPTY:
|
|
# CHECK-LABEL: Line table for /tmp/d.c
|
|
# CHECK-NEXT: 0x00000000004000e0: /tmp/d.c:2
|
|
# CHECK-NEXT: 0x00000000004000e2:
|
|
# CHECK-EMPTY:
|
|
|
|
image lookup -a 0x4000b2 -v
|
|
# CHECK-LABEL: image lookup -a 0x4000b2 -v
|
|
# CHECK: Summary: line-table.out`func + 2
|
|
|
|
breakpoint set -f c.c -l 2
|
|
# CHECK-LABEL: breakpoint set -f c.c -l 2
|
|
# CHECK: Breakpoint 1: where = line-table.out`func + 2, address = 0x00000000004000b2
|