<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - LLDB fails to detect attaching twice to the same process" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23612&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=DDUMf06MYELAe1Nlv7KChiwJLLHbYha4jtK_AOiWqwQ&m=OE19z0p1sn9SnbryWxYERj3wcsDOTvYSOR8q6VchoUQ&s=Dmvlbm-vZshJ9smildQ5-kwy7FtxMDD1LztX0vAblEs&e=">23612</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLDB fails to detect attaching twice to the same process
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ravithejawork@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While debugging with LLDB, if we try to attach to a process that is already
attached to the debugger, it does not detect that the user is trying to attach
twice to the same process. While this situation is detected in GDB which issues
a warning but LLDB kills the running process and when tries to reattach, it
fails since the process being requested is the same that it killed.

Steps to reproduce
1) Start debugging session with LLDB
2) Put breakpoint anywhere in the beggining
3) Run command "process attach <pid>" where pid is the launched process
4) There is a running process, kill it and attach?: [Y/n] Y
Process 21193 exited with status = 9 (0x00000009) 
error: Invalid arguments for 'process attach'.
Usage: process attach <cmd-options></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>