Skip to content

Commit 62d519c

Browse files
committed
Enable LLDB debug info tests on CI
1 parent 105354d commit 62d519c

File tree

7 files changed

+44
-24
lines changed

7 files changed

+44
-24
lines changed

src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
cmake \
1717
sudo \
1818
gdb \
19+
lldb-19 \
1920
llvm-19-tools \
2021
llvm-19-dev \
2122
libedit-dev \
@@ -33,6 +34,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3334
libmpc-dev \
3435
&& rm -rf /var/lib/apt/lists/*
3536

37+
# The official LLDB symbolic links seems to be broken, this is a workaround to fix them.
38+
RUN ln -sf ../../../liblldb.so.1 /usr/lib/llvm-19/lib/python3.12/site-packages/lldb/_lldb.cpython-312-x86_64-linux-gnu.so && \
39+
ln -sf ../../../../../x86_64-linux-gnu/libLLVM-19.so /usr/lib/llvm-19/lib/python3/dist-packages/lldb/libLLVM-19.*.so.1 && \
40+
ln -sf ../../../../../x86_64-linux-gnu/libLLVM-19.so /usr/lib/llvm-19/lib/python3/dist-packages/lldb/libLLVM-19.so.1
41+
42+
# This provides hint for LLDB to find the debug server binary.
43+
ENV LLDB_DEBUGSERVER_PATH=/usr/bin/lldb-server-19
44+
3645
# Install powershell (universal package) so we can test x.ps1 on Linux
3746
# FIXME: need a "universal" version that supports libicu74, but for now it still works to ignore that dep.
3847
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
@@ -52,6 +61,7 @@ ENV RUST_CONFIGURE_ARGS \
5261
--build=x86_64-unknown-linux-gnu \
5362
--llvm-root=/usr/lib/llvm-19 \
5463
--enable-llvm-link-shared \
64+
--set build.lldb=lldb-19 \
5565
--set rust.randomize-layout=true \
5666
--set rust.thin-lto-import-instr-limit=10
5767

src/ci/docker/host-x86_64/x86_64-gnu-llvm-20/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
cmake \
1717
sudo \
1818
gdb \
19+
lldb-20 \
1920
llvm-20-tools \
2021
llvm-20-dev \
2122
libedit-dev \
@@ -33,6 +34,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3334
libmpc-dev \
3435
&& rm -rf /var/lib/apt/lists/*
3536

37+
# The official LLDB symbolic links seems to be broken, this is a workaround to fix them.
38+
RUN ln -sf ../../../liblldb.so.1 /usr/lib/llvm-20/lib/python3.13/site-packages/lldb/_lldb.cpython-313-x86_64-linux-gnu.so && \
39+
ln -sf ../../../../../x86_64-linux-gnu/libLLVM-20.so /usr/lib/llvm-20/lib/python3/dist-packages/lldb/libLLVM-20.*.so.1 && \
40+
ln -sf ../../../../../x86_64-linux-gnu/libLLVM-20.so /usr/lib/llvm-20/lib/python3/dist-packages/lldb/libLLVM-20.so.1
41+
42+
# This provides hint for LLDB to find the debug server binary.
43+
ENV LLDB_DEBUGSERVER_PATH=/usr/bin/lldb-server-20
44+
3645
# Install powershell (universal package) so we can test x.ps1 on Linux
3746
# FIXME: need a "universal" version that supports libicu74, but for now it still works to ignore that dep.
3847
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
@@ -52,6 +61,7 @@ ENV RUST_CONFIGURE_ARGS \
5261
--build=x86_64-unknown-linux-gnu \
5362
--llvm-root=/usr/lib/llvm-20 \
5463
--enable-llvm-link-shared \
64+
--set build.lldb=lldb-20 \
5565
--set rust.randomize-layout=true \
5666
--set rust.thin-lto-import-instr-limit=10
5767

tests/debuginfo/by-value-non-immediate-argument.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@
3737
// lldb-command:run
3838

3939
// lldb-command:v s
40-
// lldb-check:[...] Struct { a = 1 b = 2.5 }
40+
// lldb-check:(by_value_non_immediate_argument::Struct) s = { a = 1 b = 2.5 }
4141
// lldb-command:continue
4242

4343
// lldb-command:v x
44-
// lldb-check:[...] Struct { a = 3 b = 4.5 }
44+
// lldb-check:(by_value_non_immediate_argument::Struct) x = { a = 3 b = 4.5 }
4545
// lldb-command:v y
4646
// lldb-check:[...] 5
4747
// lldb-command:v z
4848
// lldb-check:[...] 6.5
4949
// lldb-command:continue
5050

5151
// lldb-command:v a
52-
// lldb-check:[...] (7, 8, 9.5, 10.5)
52+
// lldb-check:[...] { 0 = 7 1 = 8 2 = 9.5 3 = 10.5 }
5353
// lldb-command:continue
5454

5555
// lldb-command:v a
56-
// lldb-check:[...] Newtype(11.5, 12.5, 13, 14)
56+
// lldb-check:(by_value_non_immediate_argument::Newtype) a = { 0 = 11.5 1 = 12.5 2 = 13 3 = 14 }
5757
// lldb-command:continue
5858

5959
// lldb-command:v x
60-
// lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 }
60+
// lldb-check:(by_value_non_immediate_argument::Enum) x = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 }
6161
// lldb-command:continue
6262

6363
#![feature(omit_gdb_pretty_printer_section)]

tests/debuginfo/function-arg-initialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126

127127
// NON IMMEDIATE ARGS
128128
// lldb-command:v a
129-
// lldb-check:[...] BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 }
129+
// lldb-check:(function_arg_initialization::BigStruct) a = { a = 3 b = 4 c = 5 d = 6 e = 7 f = 8 g = 9 h = 10 }
130130
// lldb-command:v b
131-
// lldb-check:[...] BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 }
131+
// lldb-check:(function_arg_initialization::BigStruct) b = { a = 11 b = 12 c = 13 d = 14 e = 15 f = 16 g = 17 h = 18 }
132132
// lldb-command:continue
133133

134134
// BINDING

tests/debuginfo/function-prologue-stepping-regular.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
// NON IMMEDIATE ARGS
3131
// lldb-command:v a
32-
// lldb-check:[...] { a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10 }
32+
// lldb-check:(function_prologue_stepping_regular::BigStruct) a = { a = 3 b = 4 c = 5 d = 6 e = 7 f = 8 g = 9 h = 10 }
3333
// lldb-command:v b
34-
// lldb-check:[...] { a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18 }
34+
// lldb-check:(function_prologue_stepping_regular::BigStruct) b = { a = 11 b = 12 c = 13 d = 14 e = 15 f = 16 g = 17 h = 18 }
3535
// lldb-command:continue
3636

3737
// BINDING

tests/debuginfo/method-on-enum.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
// STACK BY REF
6363
// lldb-command:v *self
64-
// lldb-check:[...] Variant2(117901063)
64+
// lldb-check:(method_on_enum::Enum) *self = { value = { 0 = 117901063 } $discr$ = 1 }
6565
// lldb-command:v arg1
6666
// lldb-check:[...] -1
6767
// lldb-command:v arg2
@@ -70,7 +70,7 @@
7070

7171
// STACK BY VAL
7272
// lldb-command:v self
73-
// lldb-check:[...] Variant2(117901063)
73+
// lldb-check:(method_on_enum::Enum) self = { value = { 0 = 117901063 } $discr$ = 1 }
7474
// lldb-command:v arg1
7575
// lldb-check:[...] -3
7676
// lldb-command:v arg2
@@ -79,7 +79,7 @@
7979

8080
// OWNED BY REF
8181
// lldb-command:v *self
82-
// lldb-check:[...] Variant1 { x: 1799, y: 1799 }
82+
// lldb-check:(method_on_enum::Enum) *self = { value = { x = 1799 y = 1799 } $discr$ = 0 }
8383
// lldb-command:v arg1
8484
// lldb-check:[...] -5
8585
// lldb-command:v arg2
@@ -88,7 +88,7 @@
8888

8989
// OWNED BY VAL
9090
// lldb-command:v self
91-
// lldb-check:[...] Variant1 { x: 1799, y: 1799 }
91+
// lldb-check:(method_on_enum::Enum) self = { value = { x = 1799 y = 1799 } $discr$ = 0 }
9292
// lldb-command:v arg1
9393
// lldb-check:[...] -7
9494
// lldb-command:v arg2
@@ -97,7 +97,7 @@
9797

9898
// OWNED MOVED
9999
// lldb-command:v *self
100-
// lldb-check:[...] Variant1 { x: 1799, y: 1799 }
100+
// lldb-check:(method_on_enum::Enum) *self = { value = { x = 1799 y = 1799 } $discr$ = 0 }
101101
// lldb-command:v arg1
102102
// lldb-check:[...] -9
103103
// lldb-command:v arg2

tests/debuginfo/option-like-enum.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,34 @@
3939
// lldb-command:run
4040

4141
// lldb-command:v some
42-
// lldb-check:[...] Some(&0x[...])
42+
// lldb-check:(core::option::Option<&u32>) some = { value = { 0 = 0x0000555555556014 } }
4343

4444
// lldb-command:v none
45-
// lldb-check:[...] None
45+
// lldb-check:(core::option::Option<&u32>) none = { value = $discr$ = 0 }
4646

4747
// lldb-command:v full
48-
// lldb-check:[...] Full(454545, &0x[...], 9988)
48+
// lldb-check:(option_like_enum::MoreFields) full = { value = { 0 = 454545 1 = 0x0000555555556008 2 = 9988 } $discr$ = 0 }
4949

5050
// lldb-command:v empty
51-
// lldb-check:[...] Empty
51+
// lldb-check:(option_like_enum::MoreFields) empty = { value = $discr$ = 1 }
5252

5353
// lldb-command:v droid
54-
// lldb-check:[...] Droid { id: 675675, range: 10000001, internals: &0x[...] }
54+
// lldb-check:(option_like_enum::NamedFields) droid = { value = { id = 675675 range = 10000001 internals = 0x0000555555556008 } $discr$ = 0 }
5555

5656
// lldb-command:v void_droid
57-
// lldb-check:[...] Void
57+
// lldb-check:(option_like_enum::NamedFields) void_droid = { value = $discr$ = 1 }
5858

5959
// lldb-command:v some_str
60-
// lldb-check:[...] Some("abc")
60+
// lldb-check:(core::option::Option<&str>) some_str = { value = { 0 = "abc" { [0] = 'a' [1] = 'b' [2] = 'c' } } }
6161

6262
// lldb-command:v none_str
63-
// lldb-check:[...] None
63+
// lldb-check:(core::option::Option<&str>) none_str = { value = $discr$ = 0 }
6464

6565
// lldb-command:v nested_non_zero_yep
66-
// lldb-check:[...] Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] })
66+
// lldb-check:(option_like_enum::NestedNonZero) nested_non_zero_yep = { value = { 0 = 10.5 1 = { a = 10 b = 20 c = 0x0000555555556018 } } }
6767

6868
// lldb-command:v nested_non_zero_nope
69-
// lldb-check:[...] Nope
69+
// lldb-check:nested_non_zero_nope = { value = $discr$ = 0 }
7070

7171

7272
#![feature(omit_gdb_pretty_printer_section)]

0 commit comments

Comments
 (0)