https://bugs.llvm.org/show_bug.cgi?id=47826

            Bug ID: 47826
           Summary: Cannot attach to a process with exited leader thread
                    (TID==PID)
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev@lists.llvm.org
          Reporter: jan.kratoch...@redhat.com
                CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

There does not need to exist a thread with TID equal to the process PID. That
TID could already exit while other TIDs of that PID may be still running.

https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=432b4d03ad0f23970315e9f9dec080ab4a9ab94b

simplified and deGPLed as: https://people.redhat.com/jkratoch/leader-exit2.C

Currently LLDB server cannot attach to such TID as:
  lldb-server g --attach >TID< :1234
  ptrace(PTRACE_ATTACH, >PID<) = -1 EPERM (Operation not permitted)
  write(2, "error: failed to attach to pid >TID<: Operation not permitted\n",
64) = 64

02295e6d1a1559f0689aeca09d98f468e3f29d9a = 2020-10-12

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to