[question] how to attach first thread of process
wupeijun <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CALGYOxNWR-gRC3rVUCSe0PXAJdwHi7ewqJbex-4H+SP--X5b9Q@mail.gmail.com> |
Hi, When I use `attach $pid` in gdb, 1) if the pid is a thread id, the thread specified was stoped and others just continue running. 2) But where pid is a process id gdb attach to the process and all thread in that process stoped. After read the manpage[1] and do some experiments, I found that ptrace was worked on thread level, So, is there a way for gdb only attach first thread when attach to process id. [1] http://man7.org/linux/man-pages/man2/ptrace.2.html Thanks. Regards