• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/line-table.out
2# RUN: %lldb %T/line-table.out -o "target symbols add -s line-table.out %S/Inputs/line-table.syms" \
3# RUN:   -s %s -o exit | FileCheck %s
4
5# We create a compile unit for each function. The compile unit name is the first
6# line table entry in that function.
7# This symbol file contains a single function in the "compile unit" a.c. This
8# function has two line table sequences.
9image dump line-table a.c
10# CHECK-LABEL: Line table for /tmp/a.c
11# CHECK-NEXT: 0x00000000004000b0: /tmp/a.c:1
12# CHECK-NEXT: 0x00000000004000b1: /tmp/a.c:2
13# CHECK-NEXT: 0x00000000004000b2: /tmp/c.c:2
14# CHECK-NEXT: 0x00000000004000b3:
15# CHECK-EMPTY:
16# CHECK-NEXT: 0x00000000004000b4: /tmp/c.c:3
17# CHECK-NEXT: 0x00000000004000b5:
18# CHECK-EMPTY:
19
20# Single compile unit for c.c with a single line sequence.
21image dump line-table c.c
22# CHECK-LABEL: Line table for /tmp/c.c
23# CHECK-NEXT: 0x00000000004000c0: /tmp/c.c:1
24# CHECK-NEXT: 0x00000000004000c2: /tmp/a.c:2
25# CHECK-NEXT: 0x00000000004000c4:
26# CHECK-EMPTY:
27
28# There are two compile units called "d.c". Hence, two line tables.
29image dump line-table d.c
30# CHECK-LABEL: Line table for /tmp/d.c
31# CHECK-NEXT: 0x00000000004000d0: /tmp/d.c:1
32# CHECK-NEXT: 0x00000000004000d2:
33# CHECK-EMPTY:
34# CHECK-LABEL: Line table for /tmp/d.c
35# CHECK-NEXT: 0x00000000004000e0: /tmp/d.c:2
36# CHECK-NEXT: 0x00000000004000e2:
37# CHECK-EMPTY:
38
39image lookup -a 0x4000b2 -v
40# CHECK-LABEL: image lookup -a 0x4000b2 -v
41# CHECK: Summary: line-table.out`func + 2
42
43breakpoint set -f c.c -l 2
44# CHECK-LABEL: breakpoint set -f c.c -l 2
45# CHECK: Breakpoint 1: where = line-table.out`func + 2, address = 0x00000000004000b2
46