<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Simple Case:<br><br>1.int main()<br>2.{<br>3.   int i = 0;<br>4.   return 0;<br>5.}<br><br>compile command: clang -g a.c<br><br>In LLVM IR, we have one attribute named "scopeLine" to indicate the left parentheses. But we don't have one attribute to indicate the right parentheses (line 5 in this example).<br><br>So if we use gdb to debug it:<br>(gdb) b main<br>Breakpoint 1 at 0x100005c8: file a.c, line 3.<br>(gdb) r<br>Breakpoint 1, main () at a.c:3<br>3      int i = 0;<br>Missing separate debuginfos, <br>(gdb) n<br>4      return 0;<br>(gdb) n<br>0x00003fffb7db4580 in generic_start_main.isra.0<br>We can not stop at line 5.<br><br>But GCC can stop at line 5<br>(gdb) b main<br>Breakpoint 1 at 0x100005e0: file a.c, line 3.<br>(gdb) r<br>Breakpoint 1, main () at a.c:3<br>3      int i = 0;<br>Missing separate debuginfos<br>(gdb) n<br>4      return 0;<br>(gdb) n<br>5    }<br>(gdb)<br></div></div><br><br><span title="neteasefooter"><p> </p></span>