<div dir="ltr"><div>GDB likes to load all symbols from shared libraries up front. And on x86_64 your main executable is really just another shared library.</div><div><br></div><div>So yes, it's slow. The sloth is proportional to the size of the object(s) being debugged. It's not just LLVM, it's any large (i.e. 100+MB to 1+GB) executable+library footprint. <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 9, 2019 at 4:28 PM David Greene 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">I'm wondering if anyone else is running into this problem.<br>
<br>
When I do a Debug build and attempt to run a tool (opt, llvm-dis,<br>
whatever) in gdb, the program takes a LOOOOONG time to begin executing.<br>
Loading the executable into gdb is not the problem.  I type "run" and<br>
the debugger sits there for many seconds and then things start going.<br>
gdb emits no messages indicating what it is doing but it's basically<br>
using 100% CPU.<br>
<br>
I'm wondering if this is an artifact of the gdb I'm using (buggy?) or<br>
something inherent to the way LLVM tools are built.  I see the same slow<br>
operation across different versions of gdb and I do not see the same<br>
slow operation with other executables.<br>
<br>
                         -David<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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>