Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Google and Apple developer page are really silent on this issue and finally I've found a good workaround. This error message appears when we get Xcode debugger to attach to the process that is a child process of process being debugged or that is a process already being debugged by Xcode debugger, gdb, or lldb. </p> <p><img src="https://i.stack.imgur.com/52d34.png" alt="error message"></p> <p>In order to avoid this irritating message, First put <code>kill(0, SIGSTOP)</code> statement where you want to stop the child process. In the following figure, I have put the <code>kill</code> statement right after the child is created.</p> <p><img src="https://i.stack.imgur.com/UtPKR.png" alt="enter image description here"></p> <p>Second, use <code>gcc</code> to compile your source codes with -g option.</p> <pre><code>$ ls GBN.1 gbn.c gbn.h type.h util.c util.h $ gcc *.c -g $ ./a.out [1]+ Stopped ./a.out $ ps -ef | grep a.out 501 628 600 0 9:33AM ttys000 0:00.00 ./a.out 501 629 628 0 9:33AM ttys000 0:00.00 ./a.out </code></pre> <p>Now, all we have to do is to tell Xcode debugger to attach to the process by pid. Click the <code>Debug</code> menu and then find the <code>Attach to process</code> option to click <code>By Process Identifier (PID) or name</code> option. Then type the pid for child process (or parent process) and click attach button.</p> <p><img src="https://i.stack.imgur.com/su9Uq.png" alt="enter image description here"></p> <p>Enjoy Debugging!</p> <p><img src="https://i.stack.imgur.com/gqyOs.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload