Reduce number of threads in lldb-mi.
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>
Fri, 20 Feb 2015 10:20:05 +0000 (10:20 +0000)
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>
Fri, 20 Feb 2015 10:20:05 +0000 (10:20 +0000)
commit6d87a9c09e3b44a8bba2742869f5200f796c39f0
tree58dcd9c496ae9bc98f50f448a02994647a9a2a94
parent846de99fbd2024dd8c0626408c8f3e3211b4cf0d
Reduce number of threads in lldb-mi.

LLDB-mi have 3 threads.

1. Wait for input.
2. Process commands.
3. Process events.
This revision merges 1 & 2. Same thread waits on input and then process the
command. This way, no synchronization is needed between first and 2nd. Also it is
easy to check when to exit.

A lot of code will redundant and will be cleaned up gradually.

All lldb-mi tests pass with gcc and clang as test compiler. Also did minimal testing
on command line and works ok. The "quit" and "-gdb-exit" command close the application
without needing any further return.

Reviewed in http://reviews.llvm.org/D7746.

llvm-svn: 230003
lldb/tools/lldb-mi/Driver.h
lldb/tools/lldb-mi/MICmnStreamStdin.cpp
lldb/tools/lldb-mi/MICmnStreamStdin.h
lldb/tools/lldb-mi/MIDriver.cpp
lldb/tools/lldb-mi/MIDriver.h
lldb/tools/lldb-mi/MIDriverMain.cpp
lldb/tools/lldb-mi/MIDriverMgr.cpp
lldb/tools/lldb-mi/MIDriverMgr.h