title: How to know which process(stat: T) is attached by gdb?
body: <p>When a process is attached by gdb, the stat of the process is "T", like:</p>
  
  <pre><code>root      6507  0.0  0.0  67896   952 ?        Ss   12:01   0:00 /mytest
  root      6508  0.0  0.0 156472  7120 ?        Sl   12:01   0:00 /mytest
  root     26994  0.0  0.0  67896   956 ?        Ss   19:59   0:00 /mytest
  root     26995  0.0  0.0 156460  7116 ?        Tl   19:59   0:00 /mytest
  root     27833  0.0  0.0  97972 24564 pts/2    S+   20:00   0:00 gdb /mytest
  </code></pre>
  
  <p>From the above, 26995 may be debuging. How can I know 26995 is debug or not? Or can I know which process is attached by gdb(27833)</p>
  
  <p>pstree -p 27833  --- show gdb(27833)</p>
  
  <p><strong>Another question: How to know a process(stat: T) is attached by which gdb(PID)?</strong>
  In most siduation, I am not the peoson who is debuging the process.</p>