<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 24, 2011, at 10:14 AM, Carlo Alberto Ferraris wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">

  

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  
  <div bgcolor="#ffffff" text="#000000">
    I'm working on a pass (both LLVM and the pass have been compiled in
    debug+asserts mode) but when the pass crashes in the stack trace
    printed by opt the names of the functions inside my pass don't
    appear (see frames 14-16). How can I have them displayed?<br>
    <blockquote type="cite"><tt>cafxx@ubuntu:~/Projects/llvm2/Debug+Asserts/bin$
        clear && ./opt -load=CGF.so -cgf -debug test.S <br>
        [...]<br>
        While deleting: i32 %<br>
        Use still stuck around after Def is destroyed:  ret i32
        <badref><br>
        opt: Value.cpp:76: virtual llvm::Value::~Value(): Assertion
        `use_empty() && "Uses remain when a value is
        destroyed!"' failed.<br>
        0  opt             0x0000000000d75265<br>
        1  opt             0x0000000000d75061<br>
        2  libpthread.so.0 0x00007f640c60bc60<br>
        3  libc.so.6       0x00007f640b8f6d05 gsignal + 53<br>
        4  libc.so.6       0x00007f640b8faab6 abort + 390<br>
        5  libc.so.6       0x00007f640b8ef7c5 __assert_fail + 245<br>
        6  opt             0x0000000000d1b287 llvm::Value::~Value() +
        393<br>
        7  opt             0x0000000000c18b67 llvm::User::~User() + 99<br>
        8  opt             0x0000000000cc9ee2
        llvm::Instruction::~Instruction() + 114<br>
        9  opt             0x0000000000ccbf68
        llvm::CallInst::~CallInst() + 58<br>
        10 opt             0x0000000000ccbf9a
        llvm::CallInst::~CallInst() + 24<br>
        11 opt             0x00000000008db456
        llvm::ilist_node_traits<llvm::Instruction>::deleteNode(llvm::Instruction*)
        + 42<br>
        12 opt             0x00000000008d9ffd
        llvm::iplist<llvm::Instruction,
        llvm::ilist_traits<llvm::Instruction>
        >::erase(llvm::ilist_iterator<llvm::Instruction>) + 43<br>
        13 opt             0x0000000000cca004
        llvm::Instruction::eraseFromParent() + 66<br>
        <b><font color="#cc0000">14 CGF.so          0x00007f640b6a0042<br>
            15 CGF.so          0x00007f640b69f7c3<br>
            16 CGF.so          0x00007f640b6a24fd</font></b><br>
        17 opt             0x0000000000cf75f2
        llvm::MPPassManager::runOnModule(llvm::Module&) + 456<br>
        18 opt             0x0000000000cf7ae7
        llvm::PassManagerImpl::run(llvm::Module&) + 125<br>
        19 opt             0x0000000000cf7ef5
        llvm::PassManager::run(llvm::Module&) + 39<br>
        20 opt             0x00000000008b33e3 main + 4434<br>
        21 libc.so.6       0x00007f640b8e1eff __libc_start_main + 255<br>
        22 opt             0x00000000008a3ec9<br>
        Stack dump:<br>
        0.    Program arguments: ./opt -load=CGF.so -cgf -debug test.S <br>
        1.    Running pass 'CGF' on module 'test.S'.</tt><br>
    </blockquote>
    <br></div></blockquote><div><br></div><div>Looks like your shared library is not being compiled with symbols.  Did you verify that your sources are compiled with -g?</div><br><blockquote type="cite"><div bgcolor="#ffffff" text="#000000">
    <br>
    <div class="moz-signature">-- <br>
      <style type="text/css">
    .signature {
    }
    .signature a, .signature a:link, .signature a:hover, .signature a:active, 
</style>
      <div style="background: none repeat scroll 0% 0% rgb(238, 238,
        238); border: 1px solid rgb(221, 221, 221); padding: 7px 9px;
        display: inline-block; -moz-border-radius: 6px 6px 6px 6px;">
        Carlo Alberto Ferraris <<a href="mailto:cafxx@strayorange.com">cafxx@strayorange.com</a>><br>
        <a href="http://cafxx.strayorange.com/">website/blog</a> - +39
        333 7643 235
      </div>
    </div>
  </div>

<span><cafxx.vcf></span>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Thanks,<br><br>Justin Holewinski</span>
</div>
<br></body></html>