title: R Session Aborted when attaching lldb debuger
body: <p>I try to use <code>lldb</code> to debug seg fault error in the R package I am developing. I've seen some other questions on SO which use <code>lldb</code> to debug R packages successfully. But I can't get it to work....</p>
  
  <p>I first start a new <code>Rstudio</code> process and want to attach <code>lldb</code> to the <code>rsession</code> process by the following command:</p>
  
  <pre><code>(lldb) process attach -name rsession
  </code></pre>
  
  <p>And then <code>Rstudio</code> will say that "R Session Aborted" and I have the following message in <code>lldb</code>:</p>
  
  <pre><code>Process 20658 stopped
  * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      frame #0: 0x00007fffb69b2bf2 libsystem_kernel.dylib`__psynch_cvwait + 10
  libsystem_kernel.dylib`__psynch_cvwait:
  -&gt;  0x7fffb69b2bf2 &lt;+10&gt;: jae    0x7fffb69b2bfc            ; &lt;+20&gt;
      0x7fffb69b2bf4 &lt;+12&gt;: movq   %rax, %rdi
      0x7fffb69b2bf7 &lt;+15&gt;: jmp    0x7fffb69abcaf            ; cerror_nocancel
      0x7fffb69b2bfc &lt;+20&gt;: retq  
  </code></pre>
  
  <p>And even I type the <code>c</code> command into <code>lldb</code>, <code>lldb</code> gives me message that the process is resuming, but <code>Rstudio</code> is still stucked with "R Session Aborted".</p>
  
  <pre><code>(lldb) c
  Process 20658 resuming
  (lldb) 
  </code></pre>
  
  <p>If I click <code>Rstudio</code>'s start new session, I will have a new <code>rsession</code> process, which is not attached by <code>lldb</code>.... </p>
  
  <p>What should I do to debug <code>rsession</code> using <code>lldb</code>?</p>
  
  <p>I'm currently using mac Sierra 10.12.5</p>