Skip to content

Commit a690afc

Browse files
bulbazordaugusto2112
authored andcommitted
[lldb] Fix TLS support on Darwin platforms (llvm#151601)
When I wrote this previously, I was unaware that the TLS function already adds the offset. The test was working previously because the offset was 0 in this case (only 1 thread-local variable). I added another thread-local variable to the test to make sure the offset is indeed handled correctly. rdar://156547548 (cherry picked from commit a27d34b)
1 parent 0e536bc commit a690afc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ def test(self):
7878
VARIABLES_DISPLAYED_CORRECTLY,
7979
patterns=[r"\(int\) \$.* = 66"],
8080
)
81+
self.expect(
82+
"expr var_static2",
83+
VARIABLES_DISPLAYED_CORRECTLY,
84+
patterns=[r"\(int\) \$.* = 66"],
85+
)
8186
self.expect(
8287
"expr var_shared",
8388
VARIABLES_DISPLAYED_CORRECTLY,
@@ -114,6 +119,11 @@ def test(self):
114119
VARIABLES_DISPLAYED_CORRECTLY,
115120
patterns=[r"\(int\) \$.* = 22"],
116121
)
122+
self.expect(
123+
"expr var_static2",
124+
VARIABLES_DISPLAYED_CORRECTLY,
125+
patterns=[r"\(int\) \$.* = 22"],
126+
)
117127
self.expect(
118128
"expr var_shared",
119129
VARIABLES_DISPLAYED_CORRECTLY,

0 commit comments

Comments
 (0)