[2/7] Add the attached-to thread in inf_ptrace_attach
Mark Kettenis
mark.kettenis@xs4all.nl
Fri Aug 8 21:50:00 GMT 2008
> From: Pedro Alves <pedro@codesourcery.com>
> Date: Fri, 8 Aug 2008 02:35:13 +0100
>
> This patch makes sure that the thread/task we attach to with ptrace
> targets is added to GDB's thread table. Targets that extend
> inf-ptrace (inf_ptrace_target) should then use thread_change_ptid
> as soon as then have more lwp or tid info, instead of just setting
> inferior_ptid. Targets that don't have a process_stratum target
> overriding inf_ptrace_attach get it for free (BSD targets).
>
> This was tested together with the rest of the series on
> x86_64-unknown-linux-gnu, i386-unknown-openbsd4.3, i386-unknown-freebsd6.0
> and i386-unknown-freebsd7.0.
>
> OK?
Had the inf-ptrace.c bit in my tree too. So that's defenitely ok.
I always get headaches when I look at linux-nat.c, so I'll trust you
on that one.
> 2008-08-08 Pedro Alves <pedro@codesourcery.com>
>
> * inf-ptrace.c: Include "gdbthread.h".
> (inf_ptrace_attach): Add the main thread here.
> * linux-nat.c (linux_nat_attach): Don't add the main thread here.
> Decorate the main thread id with the lwp id.
More information about the Gdb-patches
mailing list