title: kill a specific thread in GDB
body: <p>I want to kill a specific thread in gdb.
  This is how I attach a program to gdb.</p>
  
  <pre><code>(gdb) r ./bin/myProg arg1 arg2
  </code></pre>
  
  <p>I get the current running threads by</p>
  
  <pre><code>(gdb) info threads
      3 Thread 0x7ffff61fe700 (LWP 28549)  0x000000323b6db7ad in foo () from /lib64/libc.so.6
    * 2 Thread 0x7ffff6bff700 (LWP 28548)  bar () at ./src/myProg.c:229
      1 Thread 0x7ffff7506740 (LWP 28547)  0x000000323be0822d in pthread_join () from /lib64/libpthread.so.0
  </code></pre>
  
  <p>This is how I tried to kill a thread (say thread 3)</p>
  
  <pre><code>(gdb)t 3
  [Switching to thread 3 (Thread 0x7ffff61fe700 (LWP 28549))]#0  foo () at ./src/myProg.c:288
  (gdb)call raise(3,0)
  </code></pre>
  
  <p>Here I assumed the signature of <code>raise</code> as <code>raise(threadId as displayed in the gdb, signo as 0)</code></p>
  
  <p>But the thread is not getting killed. Should I use a different <code>signo</code> or is the thread id wrong?</p>
  
  <p>Note:
  I read <a href="https://stackoverflow.com/questions/8780830/can-gdb-kill-a-specific-thread">this</a> question in SO but that did not help me</p>