Skip to content

Fix step over bug rdar://140159600 #10200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rastogishubham
Copy link

rdar://140159600 ([swift][DebugInfo] Line Table at the end of "do-block" jumps back to the start of the block) describes a bug where in async code, we jump back to the top of a do block after we step over the last line of the do block in async code. The test, lldb/test/API/lang/swift/async/stepping/step_over_asynclet/TestSwiftAsyncStepOverAsyncLet.py had to be modified to account for that, this bug has been fixed with swiftlang/swift#79833 and therefore the test has to also be modified.

@rastogishubham
Copy link
Author

Please test with following pull request:
swiftlang/swift#79833

@swift-ci Please test Linux platform

@rastogishubham
Copy link
Author

Please test with following pull request:
swiftlang/swift#79833

@swift-ci Please test macOS platform

@felipepiovezan
Copy link

@rastogishubham this is the diff you need:

diff --git a/lldb/test/API/lang/swift/async/stepping/step_over_asynclet/TestSwiftAsyncStepOverAsyncLet.py b/lldb/test/API/lang/swift/async/stepping/step_over_asynclet/TestSwiftAsyncStepOverAsyncLet.py
index b7c11e200ec8..d4d3dc00797c 100644
--- a/lldb/test/API/lang/swift/async/stepping/step_over_asynclet/TestSwiftAsyncStepOverAsyncLet.py
+++ b/lldb/test/API/lang/swift/async/stepping/step_over_asynclet/TestSwiftAsyncStepOverAsyncLet.py
@@ -24,11 +24,7 @@ class TestCase(lldbtest.TestBase):
         )

         # Step over should reach every line in the interval [10, 20]
-        expected_line_nums = [10, 11, 12, 13, 14, 15]
-        # FIXME: for some reason we loop back to the start of the do block after the last statement.
-        # rdar://140159600
-        expected_line_nums += [8]
-        expected_line_nums += [17, 18, 19, 20]
+        expected_line_nums = range(10, 21)

@rastogishubham
Copy link
Author

Please test with following pull request:
swiftlang/swift#79833

@swift-ci Please test Linux platform

@rastogishubham
Copy link
Author

Please test with following pull request:
swiftlang/swift#79833

@swift-ci Please test macOS platform

@rastogishubham rastogishubham merged commit 015571a into swiftlang:stable/20240723 Mar 19, 2025
2 checks passed
@rastogishubham rastogishubham deleted the FixBugAsync branch March 19, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants