lldb: step-over __select before execution in threads

This commit is contained in:
Dmitry Trofimov
2014-11-03 17:40:42 +01:00
parent f992b4e630
commit abe6a660b9
@@ -27,15 +27,22 @@ def __lldb_init_module(debugger, internal_dict):
if not thread.IsStopped():
# thread.Suspend()
error = process.Stop()
frame = thread.GetSelectedFrame()
if frame:
print('Will settrace in: %s' % (frame,))
res = frame.EvaluateExpression("(int) SetSysTraceFunc(%s, %s)" % (
show_debug_info, is_debug), options)
error = res.GetError()
if error:
print(error)
frame = thread.GetSelectedFrame()
if frame.GetFunctionName() == '__select':
# print('We are in __select')
# Step over select, otherwise evaluating expression there can terminate thread
thread.StepOver()
frame = thread.GetSelectedFrame()
print('Will settrace in: %s' % (frame,))
res = frame.EvaluateExpression("(int) SetSysTraceFunc(%s, %s)" % (
show_debug_info, is_debug), options)
error = res.GetError()
if error:
print(error)
thread.Resume()
except: