<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Rust function of sufficient length prevents breakpoints from working"
href="https://bugs.llvm.org/show_bug.cgi?id=48029">48029</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Rust function of sufficient length prevents breakpoints from working
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dan@fritch.mn
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Following up on an issue originally reported to the VsCode plug-in CodeLLDB:
<a href="https://github.com/vadimcn/vscode-lldb/issues/369">https://github.com/vadimcn/vscode-lldb/issues/369</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>