[Bug 18660] New: Incorrect stepping over Objective-C code with ARC

Bug ID 18660
Summary Incorrect stepping over Objective-C code with ARC
Product lldb
Version 3.2
Hardware Macintosh
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter dunets.devel@gmail.com
Classification Unclassified

Environment: Xcode 5.0.2., lldb.

Step to reproduce:

1. Create sample project in Xcode.

2. Enable automatic reference counting (ARC) for some source file.

3. Add the following code to some class in that file:

- (void)method:(id)param
    if (param == nil)

 * Set the breakpoint here

    // Let param is not nil
    if (param == nil)
        NSLog(@"1. This line is not executed, nothing will be printed, but lldb
shows it as executed");

    // NSLog(@"2. If this line is uncommented, llds steps correctly");

4. Set the breakpoint above the second if statement.

5. Call method: with param != nil.

6. Step into the method: and step to the end of the method.

Actual result:

1. lldb indicates, that it steps into the second if statement, though the code
in if statements is not executed.

2. If there is some expression after the second if statement, lldb shows
program execution correctly.

Expected result:

1. Correct stepping.