<div dir="ltr">Hey Peng,<div><br></div><div>I'm really excited that you're working with LLVM, but I don't think this list is really the best place to get help with the basics of debugging. I'm afraid you'll need to debug this (and learn how to debug this) kind of failure yourself. There are lots of documents and even some good books about this you can find with a quick search.</div><div><br></div><div> If you get to the point where there is clearly a bug in LLVM upstream, you can file it on our bug tracker of course.</div><div><br></div><div>-Chandler</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 25, 2019 at 6:50 PM Peng Yu via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I edited a working .ll file and llvm-as it to a .bc file. But it<br>
causes segmentation fault. I don't know how to debug such errors.<br>
Could anybody show me the best way to debug such errors? Thanks.<br>
<br>
$ TRACE_OUTFILE=/tmp/trace.txt lli /tmp/y/bash_trcr.bc --norc<br>
__trace_init<br>
LLVMSymbolizer: error reading file: No such file or directory<br>
#0 0x00007f162b1ee0ea llvm::sys::PrintStackTrace(llvm::raw_ostream&)<br>
(/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x81e0ea)<br>
#1 0x00007f162b1ec366 llvm::sys::RunSignalHandlers()<br>
(/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x81c366)<br>
#2 0x00007f162b1ec49b (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x81c49b)<br>
#3 0x00007f162a7c3890 __restore_rt<br>
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)<br>
#4 0x00007f162a0923cc _IO_vfprintf<br>
/build/glibc-OTsEL5/glibc-2.27/stdio-common/vfprintf.c:1283:0<br>
#5 0x00007f162a09be54 _IO_fprintf<br>
/build/glibc-OTsEL5/glibc-2.27/stdio-common/fprintf.c:36:0<br>
#6 0x00007f1628ff648e<br>
#7 0x00007f1628e37bc0<br>
#8 0x00007f1628ff63a4<br>
#9 0x00007f1628fc89e5<br>
#10 0x00007f162c3cd79d llvm::MCJIT::runFunction(llvm::Function*,<br>
llvm::ArrayRef<llvm::GenericValue>)<br>
(/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19fd79d)<br>
#11 0x00007f162c3a67f7<br>
llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,<br>
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,<br>
std::allocator<char> >,<br>
std::allocator<std::__cxx11::basic_string<char,<br>
std::char_traits<char>, std::allocator<char> > > > const&, char const*<br>
const*) (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19d67f7)<br>
#12 0x0000563cd2ca472b (lli+0x2772b)<br>
#13 0x00007f162a058b97 __libc_start_main<br>
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0<br>
#14 0x0000563cd2cad34a (lli+0x3034a)<br>
Stack dump:<br>
0.    Program arguments: lli /tmp/y/bash_trcr.bc --norc<br>
Segmentation fault<br>
<br>
-- <br>
Regards,<br>
Peng<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>