Debugger: Do not run engines twice

There seems to be race in the LLDB setup on Linux. Work around
by not doing serious work twice to be able to use the test at least.

Change-Id: I387a57d3c66e6c4209bd424af9be16f17acb98fa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-10-07 12:23:57 +02:00
parent 6b2665a180
commit 27e03e6fb6

View File

@@ -94,6 +94,7 @@ class Dumper(DumperBase):
self.process = None
self.target = None
self.eventState = lldb.eStateInvalid
self.runEngineAttempted = False
self.executable_ = None
self.startMode_ = None
@@ -612,6 +613,9 @@ class Dumper(DumperBase):
% (state, error, self.executable_), args)
def runEngine(self, args):
if self.runEngineAttempted:
return
self.runEngineAttempted = True
self.prepare(args)
s = threading.Thread(target=self.loop, args=[])
s.start()