<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 - Code not executed when using "n""
href="https://bugs.llvm.org/show_bug.cgi?id=32549">32549</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Code not executed when using "n"
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</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>normal
</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>fpc@microbizz.nl
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18236" name="attach_18236" title="Test code to reproduce (requires fpc if you want to build it yourself)">attachment 18236</a> <a href="attachment.cgi?id=18236&action=edit" title="Test code to reproduce (requires fpc if you want to build it yourself)">[details]</a></span>
Test code to reproduce (requires fpc if you want to build it yourself)
This really weird. It looks like a piece of code is not executed when using "n"
to step through code. When setting multiple breakpoints and "c", the code does
get executed. The not-executed code (I assume, but it could be something else)
assigns an object field to a local variable
a3Dpt := f3DPt;
but the variable never gets it value when using "n" to step through the code.
Below are the complete terminal proceedings. Note that things work fine when
using GDB instead of LLDB.
[G20:~] adriaan% cd Desktop/Test-LLDB/build/Test-Debug-i386/
[G20:Test-LLDB/build/Test-Debug-i386] adriaan% ls -l
total 416
drwxr-xr-x 7 adriaan staff 238 4 apr 12:23 Objects
-rwxr-xr-x 1 adriaan staff 212876 4 apr 12:23 Test
drwxr-xr-x 3 adriaan staff 102 4 apr 12:23 Test.dSYM
[G20:Test-LLDB/build/Test-Debug-i386] adriaan% lldb -v
lldb-330.0.48
[G20:Test-LLDB/build/Test-Debug-i386] adriaan% lldb Test
(lldb) target create "Test"
Current executable set to 'Test' (i386).
(lldb) process launch --stop-at-entry -o stdout.txt
Process 424 launched:
'/Users/adriaan/Desktop/Test-LLDB/build/Test-Debug-i386/Test' (i386)
Process 424 stopped
* thread #1: tid = 0x116c, 0x8fe01000 dyld`_dyld_start, stop reason = signal
SIGSTOP
frame #0: 0x8fe01000 dyld`_dyld_start
dyld`_dyld_start:
-> 0x8fe01000 <+0>: popl %edx
0x8fe01001 <+1>: pushl $0x0
0x8fe01003 <+3>: movl %esp, %ebp
0x8fe01005 <+5>: andl $-0x10, %esp
(lldb) breakpoint set --file UDrawObject.pas --line 78
Breakpoint 1: where = Test`DOTEST + 25 at UDrawObject.pas:78, address =
0x0002a4e9
(lldb) c
Process 424 resuming
Process 424 stopped
* thread #1: tid = 0x116c, 0x0002a4e9 Test`DOTEST(this=0x00350020) + 25 at
UDrawObject.pas:78, queue = 'com.apple.main-thread', stop reason = breakpoint
1.1
frame #0: 0x0002a4e9 Test`DOTEST(this=0x00350020) + 25 at
UDrawObject.pas:78
75 a3Dpt: t3DPoint;
76
77 BEGIN
-> 78 SetValue;
79 a3Dpt := f3DPt;
80
81 WRITELN('DoTest');
(lldb) n
Process 424 stopped
* thread #1: tid = 0x116c, 0x0002a50b Test`DOTEST(this=0x00350020) + 59 at
UDrawObject.pas:79, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0002a50b Test`DOTEST(this=0x00350020) + 59 at
UDrawObject.pas:79
76
77 BEGIN
78 SetValue;
-> 79 a3Dpt := f3DPt;
80
81 WRITELN('DoTest');
82 WRITELN(' thePbject.f3Dpt = ',f3Dpt.x:12:3, f3Dpt.y:12:3,
f3Dpt.z:12:3);
(lldb) frame variable
error: need to add support for DW_TAG_base_type 'FormalDef' encoded with DW_ATE
= 0x7, bit_size = 0
(TDRAWOBJECT) this = 0x00350020
(T3DPOINT) A3DPT = (X = 2.3942266318434001E-309, Y = -1.9375095375144227, Z =
1.16819093729663E-307)
(lldb) p *this
(TDRAWOBJECT) $0 = {
FID = 10
F3DPT = (X = 20, Y = 10, Z = 5)
FQDPT = {
V = 0
H = 0
VH = ([0] = 0, [1] = 0)
}
}
(lldb) n
Process 424 stopped
* thread #1: tid = 0x116c, 0x0002a51b Test`DOTEST(this=0x00350020) + 75 at
UDrawObject.pas:81, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0002a51b Test`DOTEST(this=0x00350020) + 75 at
UDrawObject.pas:81
78 SetValue;
79 a3Dpt := f3DPt;
80
-> 81 WRITELN('DoTest');
82 WRITELN(' thePbject.f3Dpt = ',f3Dpt.x:12:3, f3Dpt.y:12:3,
f3Dpt.z:12:3);
83 WRITELN(' a3Dpt = ',a3Dpt.x:12:3, a3Dpt.y:12:3, a3Dpt.z:12:3);
84 END;
(lldb) frame variable
(TDRAWOBJECT) this = 0x00350020
(T3DPOINT) A3DPT = (X = 2.3942266309882071E-309, Y = -1.9375095375144227, Z =
1.16819093729663E-307)
(lldb) c
Process 424 resuming
Process 424 exited with status = 0 (0x00000000)
(lldb) q
[G20:Test-LLDB/build/Test-Debug-i386] adriaan% cat stdout.txt
DoTest
thePbject.f3Dpt = 20.000 10.000 5.000
a3Dpt = 0.000 -1.938 0.000
[G20:Test-LLDB/build/Test-Debug-i386] adriaan% lldb Test
(lldb) target create "Test"
Current executable set to 'Test' (i386).
(lldb) process launch --stop-at-entry -o stdout.txt
Process 473 launched:
'/Users/adriaan/Desktop/Test-LLDB/build/Test-Debug-i386/Test' (i386)
Process 473 stopped
* thread #1: tid = 0x1786, 0x8fe01000 dyld`_dyld_start, stop reason = signal
SIGSTOP
frame #0: 0x8fe01000 dyld`_dyld_start
dyld`_dyld_start:
-> 0x8fe01000 <+0>: popl %edx
0x8fe01001 <+1>: pushl $0x0
0x8fe01003 <+3>: movl %esp, %ebp
0x8fe01005 <+5>: andl $-0x10, %esp
(lldb) breakpoint set --file UDrawObject.pas --line 78
Breakpoint 1: where = Test`DOTEST + 25 at UDrawObject.pas:78, address =
0x0002a4e9
(lldb) breakpoint set --file UDrawObject.pas --line 81
Breakpoint 2: where = Test`DOTEST + 75 at UDrawObject.pas:81, address =
0x0002a51b
(lldb) c
Process 473 resuming
Process 473 stopped
* thread #1: tid = 0x1786, 0x0002a4e9 Test`DOTEST(this=0x00350020) + 25 at
UDrawObject.pas:78, queue = 'com.apple.main-thread', stop reason = breakpoint
1.1
frame #0: 0x0002a4e9 Test`DOTEST(this=0x00350020) + 25 at
UDrawObject.pas:78
75 a3Dpt: t3DPoint;
76
77 BEGIN
-> 78 SetValue;
79 a3Dpt := f3DPt;
80
81 WRITELN('DoTest');
(lldb) frame variable
error: need to add support for DW_TAG_base_type 'FormalDef' encoded with DW_ATE
= 0x7, bit_size = 0
(TDRAWOBJECT) this = 0x00350020
(T3DPOINT) A3DPT = (X = 2.3942266318434001E-309, Y = -1.9375095375144227, Z =
1.16819093729663E-307)
(lldb) p *this
(TDRAWOBJECT) $0 = {
FID = 10
F3DPT = (X = 20, Y = 10, Z = 5)
FQDPT = {
V = 0
H = 0
VH = ([0] = 0, [1] = 0)
}
}
(lldb) c
Process 473 resuming
Process 473 stopped
* thread #1: tid = 0x1786, 0x0002a51b Test`DOTEST(this=0x00350020) + 75 at
UDrawObject.pas:81, queue = 'com.apple.main-thread', stop reason = breakpoint
2.1
frame #0: 0x0002a51b Test`DOTEST(this=0x00350020) + 75 at
UDrawObject.pas:81
78 SetValue;
79 a3Dpt := f3DPt;
80
-> 81 WRITELN('DoTest');
82 WRITELN(' thePbject.f3Dpt = ',f3Dpt.x:12:3, f3Dpt.y:12:3,
f3Dpt.z:12:3);
83 WRITELN(' a3Dpt = ',a3Dpt.x:12:3, a3Dpt.y:12:3, a3Dpt.z:12:3);
84 END;
(lldb) frame variable
(TDRAWOBJECT) this = 0x00350020
(T3DPOINT) A3DPT = (X = 20, Y = 10, Z = 5)
(lldb) c
Process 473 resuming
Process 473 exited with status = 0 (0x00000000)
(lldb) q
[G20:Test-LLDB/build/Test-Debug-i386] adriaan% cat stdout.txt
DoTest
thePbject.f3Dpt = 20.000 10.000 5.000
a3Dpt = 20.000 10.000 5.000
[G20:Test-LLDB/build/Test-Debug-i386] adriaan%</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>