[lldb-dev] [Bug 27238] New: Python API: Unable to detach a process in running state.
via lldb-dev
lldb-dev at lists.llvm.org
Wed Apr 6 03:47:10 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27238
Bug ID: 27238
Summary: Python API: Unable to detach a process in running
state.
Product: lldb
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: release blocker
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: alexis.kofman at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The following code used to work before xcode 7.3 lldb-350.0.21.3. Now it seems
that the process can't be detached anymore. There is no error, it just hangs
when trying to detach and never execute the os._exit(0). Any thought ?
safequit_command(debugger, command, result, internal_dict):
process = lldb.target.process
listener = debugger.GetListener()
listener.StartListeningForEvents(process.GetBroadcaster(),
lldb.SBProcess.eBroadcastBitStateChanged | lldb.SBProcess.eBroadcastBitSTDOUT |
lldb.SBProcess.eBroadcastBitSTDERR)
event = lldb.SBEvent()
while True:
if listener.WaitForEvent(1, event) and
lldb.SBProcess.EventIsProcessEvent(event):
state = lldb.SBProcess.GetStateFromEvent(event)
else:
state = process.GetState()
if state == lldb.eStateRunning:
process.Detach()
os._exit(0)
elif state > lldb.eStateRunning:
os._exit(state)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160406/d2ceee7c/attachment-0001.html>
More information about the lldb-dev
mailing list