[lldb-dev] LLDB on Linux

Greg Clayton gclayton at apple.com
Tue Jul 31 09:37:10 PDT 2012


Does it hang immediately? If so, I would step through the "Driver::MainLoop()" function and see what is going on. In this function we redirect stdin/out/error into the command interpreter and also initialize editline. Something is going wrong and the main loop is trying to exit and join one of the threads it spawned (probably thread 5). This works correctly on MacOSX and FreeBSD, so something is going wrong on linux that we do not expect. The main loop should initialize editline, and go into a loop where it just keeps gettings commands until the "quit" command is received and it then exits.

On Jul 31, 2012, at 8:17 AM, Konstantin Tokarev wrote:

> 
> 
>> I don't have a linux box handy, but I'm not seeing this on FreeBSD nor on Mac OS X.
>> Can you check where it's hanging? Try to get some stack traces and let us know.
> 
> Backtrace from hanging state:
> 
> Thread 5 (Thread 0x7ffff19d6710 (LWP 31029)):
> #0  0x0000003169ccd38d in write () from /lib64/libc.so.6
> #1  0x0000003169c6d373 in _IO_new_file_write () from /lib64/libc.so.6
> #2  0x0000003169c6e605 in _IO_new_do_write () from /lib64/libc.so.6
> #3  0x0000003169c6dc48 in _IO_new_file_overflow () from /lib64/libc.so.6
> #4  0x0000003169c6a157 in fputc () from /lib64/libc.so.6
> #5  0x0000003171a31166 in tputs () from /lib64/libncurses.so.5
> #6  0x000000316a012157 in el_gets () from /usr/lib64/libedit.so.0
> #7  0x000000000040cd59 in IOChannel::LibeditGetInput(std::string&) ()
> #8  0x000000000040f8da in IOChannel::Run() ()
> #9  0x000000000040fc59 in IOChannel::IOReadThread(void*) ()
> #10 0x00007ffff60eff14 in ThreadCreateTrampoline(void*) () from /home/kostya/src/git/lldb-build/Release+Asserts/bin/../lib/liblldb.so
> #11 0x000000316a406a5d in start_thread () from /lib64/libpthread.so.0
> #12 0x0000003169cdb65d in clone () from /lib64/libc.so.6
> #13 0x0000000000000000 in ?? ()
> 
> Thread 1 (Thread 0x7ffff576e720 (LWP 31003)):
> #0  0x000000316a407ccd in pthread_join () from /lib64/libpthread.so.0
> #1  0x00007ffff60ef826 in lldb_private::Host::ThreadJoin(unsigned long, void**, lldb_private::Error*) () from /home/kostya/src/git/lldb-build/Release+Asserts/bin/../lib/liblldb.so
> #2  0x0000000000409039 in Driver::MainLoop() ()
> #3  0x000000000040b0e0 in main ()
> 
> 
> 
> -- 
> Regards,
> Konstantin




More information about the lldb-dev mailing list