<div dir="ltr">Hi,<div><br></div><div>I've been trying to figure out how does the attaching to process works in OSX, and have some questions regarding it.</div><div><br></div><div>From what I've noticed, the two available "Process" classes are:</div>
<div>1. ProcessGDBRemote</div><div>2. ProcessKDP (Which seems to be not supported)</div><div><br></div><div>It looks like that ProcessPOSIX isn't included anywhere in OSX classes, so I'm guessing it is not used in OSX.</div>
<div><br></div><div>So from what I understand, if a user wants to debug a program locally on the host it goes like this:</div><div>1. LLDB creates the debugee using posix_spawn with flag that tells it to wait until attached.</div>
<div>2. A debug server is launched through an XPC process (to get privileges to use PTrace?)</div><div>3. The debug server attaches to the process that was launched in (1).</div><div><br></div><div>Is this scenario correct for "regular" debugging (not remote and attaching to an already running process)?</div>
<div><br></div><div>Is the use of the debug server only because of the XPC limitiations and being able to use PTrace?</div><div><br></div><div>Thanks in advance,</div><div>Benjamin.</div></div>