[lldb-dev] [Bug 48029] New: Rust function of sufficient length prevents breakpoints from working

via lldb-dev lldb-dev at lists.llvm.org
Fri Oct 30 17:18:34 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=48029

            Bug ID: 48029
           Summary: Rust function of sufficient length prevents
                    breakpoints from working
           Product: lldb
           Version: 11.0
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dan at fritch.mn
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

Following up on an issue originally reported to the VsCode plug-in CodeLLDB:
https://github.com/vadimcn/vscode-lldb/issues/369

Both the author and I reached the conclusion this comes back to LLDB. 
Discovered upon porting an existing (long, ~5k LOC) C function into Rust. With
this code in place, breakpoints are not resolved:

```
break list 
Current breakpoints:
1: file = 'src/main.rs', line = 4, exact_match = 0, locations = 0 (pending)
2: file = 'main.rs', line = 5, exact_match = 0, locations = 0 (pending)
3: file = 'src/tests.rs', line = 13, exact_match = 0, locations = 0 (pending)

4: Exception breakpoint (catch: on throw: on) using: names =
{'__cxa_begin_catch', '__cxa_throw', '__cxa_rethrow'}, modules(2) =
libc++abi.dylib, libSystem.B.dylib

5: name = 'rust_panic', locations = 1, resolved = 1, hit count = 0
  5.1: where = spice21`rust_panic + 20 at panicking.rs:626:9, address =
0x00000001000acb04, resolved, hit count = 0
```

This is despite debug info being present: 

```
dsymutil -s  target/debug/spice21 | grep N_OSO 
[   920] 000269e1 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/spice21.1qcu4jwi3fjtxyk9.rcgu.o'
[   933] 00026a80 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/spice21.2ql4572xdsy6ks1i.rcgu.o'
[   946] 00026c09 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/spice21.2xq4mz9sgc2ysmfp.rcgu.o'
[   955] 00026d3a 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/spice21.36d1auo9zjn0ja0b.rcgu.o'
[   978] 00026f7c 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/spice21.3nan5uievwffbtlg.rcgu.o'
[   991] 000270b8 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/spice21.4tcozfs9ntfwgd8y.rcgu.o'
[  1001] 00027208 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/libspice21-1f365d6b281ad2bf.rlib(spice21-1f365d6b281ad2bf.11mevay8dm2eejnt.rcgu.o)'
[  1029] 000274f8 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/libspice21-1f365d6b281ad2bf.rlib(spice21-1f365d6b281ad2bf.13zfg5ipncreabid.rcgu.o)'
[  1039] 000276bf 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/libspice21-1f365d6b281ad2bf.rlib(spice21-1f365d6b281ad2bf.1442y1ntqkhpbe43.rcgu.o)'
[  1048] 0002780c 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/libspice21-1f365d6b281ad2bf.rlib(spice21-1f365d6b281ad2bf.14pwkb0vdbu5d5t8.rcgu.o)'
[  1076] 00027ac8 66 (N_OSO        ) 03     0001   0000000000000000
'target/debug/deps/libspice21-1f365d6b281ad2bf.rlib(spice21-1f365d6b281ad2bf.16uddp6gzdci0bwn.rcgu.o)'

# ... 
# about 150 others 
```

And confirming this is not an issue with the IDE plug-in, setting the same
breakpoints via LLDB command also fails:

```
break set --file src/main.rs --line 5 
Breakpoint 7: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
```

All of this is on MacOS, using the stable Rust compiler and LLDB 11. 
First time bug-filer here, please let me know what info will help.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20201031/f44a6765/attachment.html>


More information about the lldb-dev mailing list