When user tries to stop debugging, we call SBDebugger.Destroy(), then SBDebugger.Terminate() and exit the python process. This works well on mac, but on linux in running mode. However, I found if the debugger hits breakpoint first, then user stops debugging, the inferior is killed with siginal:
I tried to call SBTarget.DeleteAllBreakpoints() first before killing debugger. Still the same result.
are you doing a SBProcess.Detach() before you kill the debugger? If
that doesn't help could you send me the gdb-remote packet form
(execute command: log enable -f /some/file.log gdb-remote packets), so
I can get a better idea of what is going on.
Thanks Pavel. I think I know what’s going on. We do call SBProcess.Detach() during exiting python process normally. However, our stop debugging code seems to only kill python process directly without letting it exit normally.
Killing python process seems to detach from inferior on Mac but kills inferior on Linux. But I guess that’s because of the implementation difference, for example, Linux might left an embeded breakpoint in the inferior process without clean-up which caused the inferior to signal with “Trace/breakpoint trap”.
I will try to send a detach command to python before killing it.