Skip to content

Commit ba1a0a0

Browse files
Merge pull request #6583 from adrian-prantl/lldb-cleanups
Lldb cleanups
2 parents 0ce6be1 + af4983e commit ba1a0a0

File tree

8 files changed

+99
-110
lines changed

8 files changed

+99
-110
lines changed

lldb/test/API/commands/frame/var/direct-ivar/swift/TestFrameVarDirectIvarSwift.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55

66

77
class TestCase(TestBase):
8+
@swiftTest
89
@skipUnlessDarwin
910
def test_objc_self(self):
1011
self.build()
1112
lldbutil.run_to_source_breakpoint(self, "check self", lldb.SBFileSpec("main.swift"))
1213
self.expect("frame variable _prop", startstr="(Int) _prop = 30")
1314

15+
@swiftTest
1416
@skipUnlessDarwin
1517
def test_objc_self_capture_idiom(self):
1618
self.build()

lldb/test/API/functionalities/data-formatter/swift-unsafe/main.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func main() {
103103

104104
colors.withUnsafeBufferPointer {
105105
let buf = $0
106+
print("break")
106107
//% self.expect("frame variable -d run-target buf",
107108
//% patterns=[
108109
//% '\(UnsafeBufferPointer<(.*)\.ColorCode>\) buf = 2 values \(0[xX][0-9a-fA-F]+\) {',
@@ -139,6 +140,7 @@ func main() {
139140

140141
numbers.withUnsafeBufferPointer {
141142
let buf = $0
143+
print("break")
142144
//% self.expect("frame variable -d run-target buf",
143145
//% patterns=[
144146
//% '\(UnsafeBufferPointer<(.*)\.Number<Double>>\) buf = 2 values \(0[xX][0-9a-fA-F]+\) {',
@@ -153,20 +155,23 @@ func main() {
153155
bytes.withUnsafeBufferPointer {
154156
let buf = $0
155157
let rawbuf = UnsafeRawBufferPointer(buf)
158+
print("break")
156159
//% self.expect("frame variable -d run-target rawbuf",
157160
//% patterns=[
158161
//% '\(UnsafeRawBufferPointer\) rawbuf = 256 values \(0[xX][0-9a-fA-F]+\) {',
159162
//% '\[([0-9]+)\] = (\\1)'
160163
//% ])
161164
typealias ByteBuffer = UnsafeRawBufferPointer;
162165
let alias = rawbuf as ByteBuffer
166+
print("break")
163167
//% self.expect("frame variable -d run-target alias",
164168
//% patterns=[
165169
//% '\(ByteBuffer\) alias = 256 values \(0[xX][0-9a-fA-F]+\) {',
166170
//% '\[([0-9]+)\] = (\\1)',
167171
//% ])
168172
typealias ByteBufferAlias = ByteBuffer
169173
let secondAlias = alias as ByteBufferAlias
174+
print("break")
170175
//% self.expect("frame variable -d run-target secondAlias",
171176
//% patterns=[
172177
//% '\(ByteBufferAlias\) secondAlias = 256 values \(0[xX][0-9a-fA-F]+\) {',

lldb/test/API/lang/swift/generic_class/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ protocol P {
1111
}
1212
extension F : P {
1313
@inline(never) func method() {
14-
print("break here \(b)")
14+
print("break here \(b) \(self)")
1515
}
1616
}
1717

lldb/test/API/lang/swift/stepping/TestSwiftStepping.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ def do_test(self):
200200
thread.StepOver()
201201
self.hit_correct_line(thread, "At point initializer.")
202202
thread.StepOver()
203-
self.hit_correct_line (thread, "At the beginning of the switch.")
203+
stopped_at_switch = self.hit_correct_line (thread, "At the beginning of the switch.", False)
204+
if stopped_at_switch:
205+
thread.StepOver()
204206

205-
thread.StepOver()
206207
stopped_at_case = self.hit_correct_line(
207208
thread, "case (let x, let y) where", False)
208209
if stopped_at_case:
@@ -312,6 +313,10 @@ def do_test(self):
312313
if stop_on_partial_apply:
313314
thread.StepOver()
314315

316+
stop_at_brace = self.hit_correct_line(thread, "Opening brace", False)
317+
if stop_at_brace:
318+
thread.StepOver()
319+
315320
self.hit_correct_line(thread, "doSomethingWithFunction(cd_maker, 10)")
316321

317322
thread.StepInto()

lldb/test/API/lang/swift/stepping/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func main () -> Void
205205
indirect.protocol_func(20)
206206

207207
var cd_maker =
208-
{
208+
{ // Opening brace
209209
(arg : Int) -> ConformsDirectly in // Step into cd_maker stops at closure decl instead.
210210
return ConformsDirectly(arg) // Step into should stop here in closure.
211211
}

0 commit comments

Comments
 (0)