<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 - lldb not stopped at a inline function call statement"
href="https://bugs.llvm.org/show_bug.cgi?id=45608">45608</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lldb not stopped at a inline function call statement
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>yangyibiao@hust.edu.cn
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ lldb --version
lldb version 9.0.1
$ cat small.c
__attribute__((always_inline))
inline void foo(int *x) {
*x = 1;
}
int main() {
int x;
foo(&x);
return x;
}
$ clang -g small.c; lldb ./a.out
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) breakpoint set -f small.c -l 8
Breakpoint 1: where = a.out`main + 46 at small.c:9:10, address =
0x000000000000116e
(lldb) run
Process 40617 launched: '/home/yibiao/cv-gcov/a.out' (x86_64)
Process 40617 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
frame #0: 0x000055555555516e a.out`main at small.c:9:10
6 int main() {
7 int x;
8 foo(&x);
-> 9 return x;
10 }
/***
when setting breakpoint at line 8 in small.c, it stopped at line 9.
However, when we using "process launch --stop-at-entry" and then setting
breakpoint on address main+0. It will stopped at line 8 as follows:
***/
$ clang -g small.c; lldb ./a.out
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) process launch --stop-at-entry
Process 40841 launched: '/home/yibiao/cv-gcov/a.out' (x86_64)
(lldb) breakpoint set -a main+0
Breakpoint 1: where = a.out`main at small.c:6, address = 0x0000555555555140
(lldb) c
Process 40841 resuming
Process 40841 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
frame #0: 0x0000555555555140 a.out`main at small.c:6
3 *x = 1;
4 }
5
-> 6 int main() {
7 int x;
8 foo(&x);
9 return x;
(lldb) step
Process 40841 stopped
* thread #1, name = 'a.out', stop reason = step in
frame #0: 0x0000555555555164 a.out`main at small.c:8
5
6 int main() {
7 int x;
-> 8 foo(&x);
9 return x;
10 }
/***
It seems that this is an inconsistent behavior in lldb.
***/</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>