<div dir="ltr">I tested it with the symbols enabled for lli and it still doesn't work. Below is the assembly for GDBJITRegistrar::registerObject containing the inlined body of NotifyDebugger.  It looks like the call to __jit_debug_register_code was inlined away despite being marked with LLVM_ATTRIBUTE_NOINLINE. LLVM was compiled with the following GCC:<div>
<br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">zdevito@derp:~/terra/tests$ gcc --version<br>
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3<br>Copyright (C) 2011 Free Software Foundation, Inc.<br>This is free software; see the source for copying conditions.  There is NO<br>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</blockquote>
<div><br></div><div>Maybe the LLVM_ATTRIBUTE_NOINLINE macro is defined wrong, or the compiler is ignoring it?</div><div><br></div><div>Zach</div><div><br></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Dump of assembler code for function (anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&):<br>   0x0000000000b1eba0 <+0>:<span class="" style="white-space:pre">        </span>push   rbp<br>   0x0000000000b1eba1 <+1>:<span class="" style="white-space:pre">      </span>push   r15<br>
   0x0000000000b1eba3 <+3>:<span class="" style="white-space:pre">    </span>push   r14<br>   0x0000000000b1eba5 <+5>:<span class="" style="white-space:pre">      </span>push   r13<br>   0x0000000000b1eba7 <+7>:<span class="" style="white-space:pre">      </span>push   r12<br>
   0x0000000000b1eba9 <+9>:<span class="" style="white-space:pre">    </span>push   rbx<br>   0x0000000000b1ebaa <+10>:<span class="" style="white-space:pre">     </span>sub    rsp,0x28<br>   0x0000000000b1ebae <+14>:<span class="" style="white-space:pre">   </span>mov    r14,rdi<br>
   0x0000000000b1ebb1 <+17>:<span class="" style="white-space:pre">   </span>mov    rax,QWORD PTR [rsi+0x8]<br>   0x0000000000b1ebb5 <+21>:<span class="" style="white-space:pre">    </span>mov    r13,QWORD PTR [rax+0x8]<br>
   0x0000000000b1ebb9 <+25>:<span class="" style="white-space:pre">   </span>mov    QWORD PTR [rsp+0x8],r13<br>   0x0000000000b1ebbe <+30>:<span class="" style="white-space:pre">    </span>test   r13,r13<br>   0x0000000000b1ebc1 <+33>:<span class="" style="white-space:pre"> </span>je     0xb1edcf <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+559><br>
   0x0000000000b1ebc7 <+39>:<span class="" style="white-space:pre">   </span>mov    rax,QWORD PTR [rax+0x10]<br>   0x0000000000b1ebcb <+43>:<span class="" style="white-space:pre">   </span>sub    rax,r13<br>   0x0000000000b1ebce <+46>:<span class="" style="white-space:pre">    </span>mov    QWORD PTR [rsp],rax<br>
   0x0000000000b1ebd2 <+50>:<span class="" style="white-space:pre">   </span>mov    r15,QWORD PTR [r14+0x8]<br>   0x0000000000b1ebd6 <+54>:<span class="" style="white-space:pre">    </span>mov    ebp,DWORD PTR [r14+0x18]<br>
   0x0000000000b1ebda <+58>:<span class="" style="white-space:pre">   </span>add    r14,0x8<br>   0x0000000000b1ebde <+62>:<span class="" style="white-space:pre">    </span>test   rbp,rbp<br>   0x0000000000b1ebe1 <+65>:<span class="" style="white-space:pre"> </span>je     0xb1ec3f <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+159><br>
   0x0000000000b1ebe3 <+67>:<span class="" style="white-space:pre">   </span>mov    rax,r13<br>   0x0000000000b1ebe6 <+70>:<span class="" style="white-space:pre">    </span>or     rax,0x4<br>   0x0000000000b1ebea <+74>:<span class="" style="white-space:pre">    </span>cmp    rax,0xfffffffffffffffc<br>
   0x0000000000b1ebee <+78>:<span class="" style="white-space:pre">   </span>je     0xb1ee1e <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+638><br>   0x0000000000b1ebf4 <+84>:<span class="" style="white-space:pre"> </span>mov    ecx,r13d<br>
   0x0000000000b1ebf7 <+87>:<span class="" style="white-space:pre">   </span>shr    ecx,0x9<br>   0x0000000000b1ebfa <+90>:<span class="" style="white-space:pre">    </span>mov    eax,r13d<br>   0x0000000000b1ebfd <+93>:<span class="" style="white-space:pre">   </span>shr    eax,0x4<br>
   0x0000000000b1ec00 <+96>:<span class="" style="white-space:pre">   </span>xor    eax,ecx<br>   0x0000000000b1ec02 <+98>:<span class="" style="white-space:pre">    </span>lea    ecx,[rbp-0x1]<br>   0x0000000000b1ec05 <+101>:<span class="" style="white-space:pre">     </span>and    eax,ecx<br>
   0x0000000000b1ec07 <+103>:<span class="" style="white-space:pre">  </span>lea    rdx,[rax+rax*2]<br>   0x0000000000b1ec0b <+107>:<span class="" style="white-space:pre">   </span>mov    rsi,QWORD PTR [r15+rdx*8]<br>
   0x0000000000b1ec0f <+111>:<span class="" style="white-space:pre">  </span>cmp    r13,rsi<br>   0x0000000000b1ec12 <+114>:<span class="" style="white-space:pre">   </span>je     0xb1ec4a <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+170><br>
   0x0000000000b1ec14 <+116>:<span class="" style="white-space:pre">  </span>mov    edx,0x1<br>   0x0000000000b1ec19 <+121>:<span class="" style="white-space:pre">   </span>nop    DWORD PTR [rax+0x0]<br>   0x0000000000b1ec20 <+128>:<span class="" style="white-space:pre">       </span>cmp    rsi,0xfffffffffffffffc<br>
   0x0000000000b1ec24 <+132>:<span class="" style="white-space:pre">  </span>je     0xb1ec3f <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+159><br>   0x0000000000b1ec26 <+134>:<span class="" style="white-space:pre">        </span>add    eax,edx<br>
   0x0000000000b1ec28 <+136>:<span class="" style="white-space:pre">  </span>and    eax,ecx<br>   0x0000000000b1ec2a <+138>:<span class="" style="white-space:pre">   </span>lea    rdi,[rax+rax*2]<br>   0x0000000000b1ec2e <+142>:<span class="" style="white-space:pre">   </span>mov    rsi,QWORD PTR [r15+rdi*8]<br>
   0x0000000000b1ec32 <+146>:<span class="" style="white-space:pre">  </span>inc    edx<br>   0x0000000000b1ec34 <+148>:<span class="" style="white-space:pre">       </span>cmp    r13,rsi<br>   0x0000000000b1ec37 <+151>:<span class="" style="white-space:pre">   </span>jne    0xb1ec20 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+128><br>
   0x0000000000b1ec39 <+153>:<span class="" style="white-space:pre">  </span>lea    rax,[r15+rdi*8]<br>   0x0000000000b1ec3d <+157>:<span class="" style="white-space:pre">   </span>jmp    0xb1ec4e <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+174><br>
   0x0000000000b1ec3f <+159>:<span class="" style="white-space:pre">  </span>lea    rax,[rbp+rbp*2+0x0]<br>   0x0000000000b1ec44 <+164>:<span class="" style="white-space:pre">       </span>lea    rax,[r15+rax*8]<br>   0x0000000000b1ec48 <+168>:<span class="" style="white-space:pre">   </span>jmp    0xb1ec4e <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+174><br>
   0x0000000000b1ec4a <+170>:<span class="" style="white-space:pre">  </span>lea    rax,[r15+rdx*8]<br>   0x0000000000b1ec4e <+174>:<span class="" style="white-space:pre">   </span>lea    rcx,[rbp+rbp*2+0x0]<br>   0x0000000000b1ec53 <+179>:<span class="" style="white-space:pre">       </span>lea    rcx,[r15+rcx*8]<br>
   0x0000000000b1ec57 <+183>:<span class="" style="white-space:pre">  </span>cmp    rax,rcx<br>   0x0000000000b1ec5a <+186>:<span class="" style="white-space:pre">   </span>jne    0xb1edee <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+590><br>
   0x0000000000b1ec60 <+192>:<span class="" style="white-space:pre">  </span>mov    edi,0x20<br>   0x0000000000b1ec65 <+197>:<span class="" style="white-space:pre">  </span>call   0x4e8120 <_Znwm@plt><br>   0x0000000000b1ec6a <+202>:<span class="" style="white-space:pre">     </span>mov    r12,rax<br>
   0x0000000000b1ec6d <+205>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [r12+0x18],0x0<br>   0x0000000000b1ec76 <+214>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [r12+0x10],0x0<br>
   0x0000000000b1ec7f <+223>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [r12+0x8],0x0<br>   0x0000000000b1ec88 <+232>:<span class="" style="white-space:pre">   </span>mov    QWORD PTR [r12],0x0<br>
   0x0000000000b1ec90 <+240>:<span class="" style="white-space:pre">  </span>test   r12,r12<br>   0x0000000000b1ec93 <+243>:<span class="" style="white-space:pre">        </span>je     0xb1ee0d <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+621><br>
   0x0000000000b1ec99 <+249>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [r12+0x10],r13<br>   0x0000000000b1ec9e <+254>:<span class="" style="white-space:pre">  </span>mov    rax,QWORD PTR [rsp]<br>
   0x0000000000b1eca2 <+258>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [r12+0x18],rax<br>   0x0000000000b1eca7 <+263>:<span class="" style="white-space:pre">  </span>xor    eax,eax<br>   0x0000000000b1eca9 <+265>:<span class="" style="white-space:pre">   </span>test   ebp,ebp<br>
   0x0000000000b1ecab <+267>:<span class="" style="white-space:pre">  </span>je     0xb1ed2b <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+395><br>   0x0000000000b1ecad <+269>:<span class="" style="white-space:pre">        </span>mov    rax,r13<br>
   0x0000000000b1ecb0 <+272>:<span class="" style="white-space:pre">  </span>or     rax,0x4<br>   0x0000000000b1ecb4 <+276>:<span class="" style="white-space:pre">   </span>cmp    rax,0xfffffffffffffffc<br>   0x0000000000b1ecb8 <+280>:<span class="" style="white-space:pre">    </span>je     0xb1ee1e <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+638><br>
   0x0000000000b1ecbe <+286>:<span class="" style="white-space:pre">  </span>mov    eax,r13d<br>   0x0000000000b1ecc1 <+289>:<span class="" style="white-space:pre">  </span>shr    eax,0x9<br>   0x0000000000b1ecc4 <+292>:<span class="" style="white-space:pre">   </span>mov    ecx,r13d<br>
   0x0000000000b1ecc7 <+295>:<span class="" style="white-space:pre">  </span>shr    ecx,0x4<br>   0x0000000000b1ecca <+298>:<span class="" style="white-space:pre">   </span>xor    ecx,eax<br>   0x0000000000b1eccc <+300>:<span class="" style="white-space:pre">   </span>dec    ebp<br>
   0x0000000000b1ecce <+302>:<span class="" style="white-space:pre">  </span>and    ecx,ebp<br>   0x0000000000b1ecd0 <+304>:<span class="" style="white-space:pre">   </span>lea    rdx,[rcx+rcx*2]<br>   0x0000000000b1ecd4 <+308>:<span class="" style="white-space:pre">   </span>lea    rax,[r15+rdx*8]<br>
   0x0000000000b1ecd8 <+312>:<span class="" style="white-space:pre">  </span>mov    rdi,QWORD PTR [r15+rdx*8]<br>   0x0000000000b1ecdc <+316>:<span class="" style="white-space:pre"> </span>cmp    r13,rdi<br>   0x0000000000b1ecdf <+319>:<span class="" style="white-space:pre">   </span>je     0xb1ed65 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+453><br>
   0x0000000000b1ece5 <+325>:<span class="" style="white-space:pre">  </span>xor    edx,edx<br>   0x0000000000b1ece7 <+327>:<span class="" style="white-space:pre">   </span>mov    esi,0x1<br>   0x0000000000b1ecec <+332>:<span class="" style="white-space:pre">   </span>nop    DWORD PTR [rax+0x0]<br>
   0x0000000000b1ecf0 <+336>:<span class="" style="white-space:pre">  </span>cmp    rdi,0xfffffffffffffffc<br>   0x0000000000b1ecf4 <+340>:<span class="" style="white-space:pre">    </span>je     0xb1ed24 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+388><br>
   0x0000000000b1ecf6 <+342>:<span class="" style="white-space:pre">  </span>add    ecx,esi<br>   0x0000000000b1ecf8 <+344>:<span class="" style="white-space:pre">   </span>and    ecx,ebp<br>   0x0000000000b1ecfa <+346>:<span class="" style="white-space:pre">   </span>test   rdx,rdx<br>
   0x0000000000b1ecfd <+349>:<span class="" style="white-space:pre">  </span>sete   r8b<br>   0x0000000000b1ed01 <+353>:<span class="" style="white-space:pre">    </span>cmp    rdi,0xfffffffffffffff8<br>   0x0000000000b1ed05 <+357>:<span class="" style="white-space:pre">    </span>sete   bl<br>
   0x0000000000b1ed08 <+360>:<span class="" style="white-space:pre">  </span>test   r8b,bl<br>   0x0000000000b1ed0b <+363>:<span class="" style="white-space:pre"> </span>cmovne rdx,rax<br>   0x0000000000b1ed0f <+367>:<span class="" style="white-space:pre">     </span>lea    rdi,[rcx+rcx*2]<br>
   0x0000000000b1ed13 <+371>:<span class="" style="white-space:pre">  </span>lea    rax,[r15+rdi*8]<br>   0x0000000000b1ed17 <+375>:<span class="" style="white-space:pre">   </span>mov    rdi,QWORD PTR [r15+rdi*8]<br>
   0x0000000000b1ed1b <+379>:<span class="" style="white-space:pre">  </span>inc    esi<br>   0x0000000000b1ed1d <+381>:<span class="" style="white-space:pre">       </span>cmp    r13,rdi<br>   0x0000000000b1ed20 <+384>:<span class="" style="white-space:pre">   </span>jne    0xb1ecf0 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+336><br>
   0x0000000000b1ed22 <+386>:<span class="" style="white-space:pre">  </span>jmp    0xb1ed65 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+453><br>   0x0000000000b1ed24 <+388>:<span class="" style="white-space:pre">        </span>test   rdx,rdx<br>
   0x0000000000b1ed27 <+391>:<span class="" style="white-space:pre">  </span>cmovne rax,rdx<br>   0x0000000000b1ed2b <+395>:<span class="" style="white-space:pre">     </span>xorps  xmm0,xmm0<br>   0x0000000000b1ed2e <+398>:<span class="" style="white-space:pre">      </span>movaps XMMWORD PTR [rsp+0x10],xmm0<br>
   0x0000000000b1ed33 <+403>:<span class="" style="white-space:pre">  </span>lea    rsi,[rsp+0x8]<br>   0x0000000000b1ed38 <+408>:<span class="" style="white-space:pre">     </span>mov    rdi,r14<br>   0x0000000000b1ed3b <+411>:<span class="" style="white-space:pre">   </span>mov    rdx,rax<br>
   0x0000000000b1ed3e <+414>:<span class="" style="white-space:pre">  </span>call   0xb1f150 <llvm::DenseMapBase<llvm::DenseMap<char const*, std::pair<unsigned long, jit_code_entry*>, llvm::DenseMapInfo<char const*> >, char const*, std::pair<unsigned long, jit_code_entry*>, llvm::DenseMapInfo<char const*> >::InsertIntoBucketImpl(char const* const&, std::pair<char const*, std::pair<unsigned long, jit_code_entry*> >*)><br>
   0x0000000000b1ed43 <+419>:<span class="" style="white-space:pre">  </span>mov    rcx,QWORD PTR [rsp+0x8]<br>   0x0000000000b1ed48 <+424>:<span class="" style="white-space:pre">   </span>mov    QWORD PTR [rax],rcx<br>
   0x0000000000b1ed4b <+427>:<span class="" style="white-space:pre">  </span>mov    rcx,rax<br>   0x0000000000b1ed4e <+430>:<span class="" style="white-space:pre">   </span>add    rcx,0x8<br>   0x0000000000b1ed52 <+434>:<span class="" style="white-space:pre">   </span>je     0xb1ed65 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+453><br>
   0x0000000000b1ed54 <+436>:<span class="" style="white-space:pre">  </span>mov    rdx,QWORD PTR [rsp+0x10]<br>   0x0000000000b1ed59 <+441>:<span class="" style="white-space:pre">  </span>mov    rsi,QWORD PTR [rsp+0x18]<br>
   0x0000000000b1ed5e <+446>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [rcx+0x8],rsi<br>   0x0000000000b1ed62 <+450>:<span class="" style="white-space:pre">   </span>mov    QWORD PTR [rcx],rdx<br>
   0x0000000000b1ed65 <+453>:<span class="" style="white-space:pre">  </span>mov    rcx,QWORD PTR [rsp]<br>   0x0000000000b1ed69 <+457>:<span class="" style="white-space:pre">       </span>mov    QWORD PTR [rax+0x8],rcx<br>
   0x0000000000b1ed6d <+461>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [rax+0x10],r12<br>=> 0x0000000000b1ed71 <+465>:<span class="" style="white-space:pre"> </span>lea    rdi,[rip+0x707310]        # 0x1226088 <_ZN12_GLOBAL__N_112JITDebugLockE><br>
   0x0000000000b1ed78 <+472>:<span class="" style="white-space:pre">  </span>call   0xca3810 <llvm::sys::MutexImpl::acquire()><br>   0x0000000000b1ed7d <+477>:<span class="" style="white-space:pre">       </span>mov    rax,QWORD PTR [rip+0x6fdeb4]        # 0x121cc38<br>
   0x0000000000b1ed84 <+484>:<span class="" style="white-space:pre">  </span>mov    DWORD PTR [rax+0x4],0x1<br>   0x0000000000b1ed8b <+491>:<span class="" style="white-space:pre">   </span>mov    QWORD PTR [r12+0x8],0x0<br>
   0x0000000000b1ed94 <+500>:<span class="" style="white-space:pre">  </span>mov    rax,QWORD PTR [rax+0x10]<br>   0x0000000000b1ed98 <+504>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [r12],rax<br>
   0x0000000000b1ed9c <+508>:<span class="" style="white-space:pre">  </span>test   rax,rax<br>   0x0000000000b1ed9f <+511>:<span class="" style="white-space:pre">        </span>je     0xb1eda5 <(anonymous namespace)::GDBJITRegistrar::registerObject(llvm::ObjectBuffer const&)+517><br>
   0x0000000000b1eda1 <+513>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [rax+0x8],r12<br>   0x0000000000b1eda5 <+517>:<span class="" style="white-space:pre">   </span>mov    rax,QWORD PTR [rip+0x6fde8c]        # 0x121cc38<br>
   0x0000000000b1edac <+524>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [rax+0x10],r12<br>   0x0000000000b1edb0 <+528>:<span class="" style="white-space:pre">  </span>mov    QWORD PTR [rax+0x8],r12<br>
   0x0000000000b1edb4 <+532>:<span class="" style="white-space:pre">  </span>lea    rdi,[rip+0x7072cd]        # 0x1226088 <_ZN12_GLOBAL__N_112JITDebugLockE><br>   0x0000000000b1edbb <+539>:<span class="" style="white-space:pre">        </span>call   0xca3850 <llvm::sys::MutexImpl::release()><br>
   0x0000000000b1edc0 <+544>:<span class="" style="white-space:pre">  </span>add    rsp,0x28<br>   0x0000000000b1edc4 <+548>:<span class="" style="white-space:pre">  </span>pop    rbx<br>   0x0000000000b1edc5 <+549>:<span class="" style="white-space:pre">       </span>pop    r12<br>
   0x0000000000b1edc7 <+551>:<span class="" style="white-space:pre">  </span>pop    r13<br>   0x0000000000b1edc9 <+553>:<span class="" style="white-space:pre">       </span>pop    r14<br>   0x0000000000b1edcb <+555>:<span class="" style="white-space:pre">       </span>pop    r15<br>
   0x0000000000b1edcd <+557>:<span class="" style="white-space:pre">  </span>pop    rbp<br>   0x0000000000b1edce <+558>:<span class="" style="white-space:pre">       </span>ret    <br>   0x0000000000b1edcf <+559>:<span class="" style="white-space:pre">  </span>lea    rdi,[rip+0x35f9a9]        # 0xe7e77f<br>
   0x0000000000b1edd6 <+566>:<span class="" style="white-space:pre">  </span>lea    rsi,[rip+0x35f6fc]        # 0xe7e4d9<br>   0x0000000000b1eddd <+573>:<span class="" style="white-space:pre">  </span>lea    rcx,[rip+0x35f9da]        # 0xe7e7be<br>
   0x0000000000b1ede4 <+580>:<span class="" style="white-space:pre">  </span>mov    edx,0x84<br>   0x0000000000b1ede9 <+585>:<span class="" style="white-space:pre">  </span>call   0x4e7ef0 <__assert_fail@plt><br>
   0x0000000000b1edee <+590>:<span class="" style="white-space:pre">  </span>lea    rdi,[rip+0x35fa29]        # 0xe7e81e<br>   0x0000000000b1edf5 <+597>:<span class="" style="white-space:pre">  </span>lea    rsi,[rip+0x35f6dd]        # 0xe7e4d9<br>
   0x0000000000b1edfc <+604>:<span class="" style="white-space:pre">  </span>lea    rcx,[rip+0x35f9bb]        # 0xe7e7be<br>   0x0000000000b1ee03 <+611>:<span class="" style="white-space:pre">  </span>mov    edx,0x86<br>
   0x0000000000b1ee08 <+616>:<span class="" style="white-space:pre">  </span>call   0x4e7ef0 <__assert_fail@plt><br>   0x0000000000b1ee0d <+621>:<span class="" style="white-space:pre">     </span>lea    rdi,[rip+0x35fa73]        # 0xe7e887<br>
   0x0000000000b1ee14 <+628>:<span class="" style="white-space:pre">  </span>mov    esi,0x1<br>   0x0000000000b1ee19 <+633>:<span class="" style="white-space:pre">   </span>call   0xc9dbe0 <llvm::report_fatal_error(char const*, bool)><br>
   0x0000000000b1ee1e <+638>:<span class="" style="white-space:pre">  </span>lea    rdi,[rip+0x1a8998]        # 0xcc77bd<br>   0x0000000000b1ee25 <+645>:<span class="" style="white-space:pre">  </span>lea    rsi,[rip+0x1a8045]        # 0xcc6e71<br>
   0x0000000000b1ee2c <+652>:<span class="" style="white-space:pre">  </span>lea    rcx,[rip+0x35f722]        # 0xe7e555<br>   0x0000000000b1ee33 <+659>:<span class="" style="white-space:pre">  </span>mov    edx,0x1e0<br>
   0x0000000000b1ee38 <+664>:<span class="" style="white-space:pre">  </span>call   0x4e7ef0 <__assert_fail@plt></blockquote></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 25, 2014 at 4:19 PM, Kaylor, Andrew <span dir="ltr"><<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Actually, put aside what I said in my previous reply for a second.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I just noticed in your output below that GDB didn’t have symbols for lli.  That’s probably the heart of your problem.  GDB relies on hooking a known function
 to get the JITed code registration to work.  Since it didn’t find symbols for lli, it won’t find the hook function.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You’ll need to use a build of lli with symbols to make this work.<u></u><u></u></span></p><div class="">

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-Andy<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Zach Devito<br>
<b>Sent:</b> Tuesday, March 25, 2014 1:35 PM<br>
<b>To:</b> LLVM Developers Mailing List<br>
<b>Subject:</b> [LLVMdev] Getting the Debugging JIT-ed Code with GDB example to work<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div><div>
<p class="MsoNormal">I'm trying to run the example described at:<u></u><u></u></p><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://llvm.org/docs/DebuggingJITedCode.html" target="_blank">http://llvm.org/docs/DebuggingJITedCode.html</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I followed the sample command line session (below, with versions numbers for everything), but gdb doesn't stop at the breakpoints as described. Any idea what is wrong?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Zach<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">zdevito@derp:~/terra/tests$ ~/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/clang -cc1 -O0 -g -emit-llvm showdebug.c <br>
zdevito@derp:~/terra/tests$ gdb --args ~/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/lli -use-mcjit showdebug.ll 5<br>
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04<br>
Copyright (C) 2012 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-linux-gnu".<br>
For bug reporting instructions, please see:<br>
<<a href="http://bugs.launchpad.net/gdb-linaro/" target="_blank">http://bugs.launchpad.net/gdb-linaro/</a>>...<br>
Reading symbols from /home/zdevito/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/lli...(no debugging symbols found)...done.<br>
(gdb) b showdebug.c:6<br>
No symbol table is loaded.  Use the "file" command.<br>
Make breakpoint pending on future shared library load? (y or [n]) y<br>
Breakpoint 1 (showdebug.c:6) pending.<br>
(gdb) r<br>
Starting program: /home/zdevito/clang+llvm-3.4-x86_64-unknown-ubuntu12.04/bin/lli -use-mcjit showdebug.ll 5<br>
[Thread debugging using libthread_db enabled]<br>
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".<br>
[Inferior 1 (process 8538) exited with code 0170]<br>
(gdb) <u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>