Add support for NetBSD thread events (create, exit)
authorKamil Rytarowski <n54@gmx.com>
Thu, 30 Apr 2020 14:13:33 +0000 (16:13 +0200)
committerKamil Rytarowski <n54@gmx.com>
Thu, 30 Apr 2020 19:53:12 +0000 (21:53 +0200)
commit117539e6d505f75386de6ba1bbe0b82e7c8ef111
tree2df6f878efd11b992f2e0ba684103135414850f8
parentb2a0dd767a59a4b1e343c178177dcaee55e540f1
Add support for NetBSD thread events (create, exit)

Report LWP CREATE and LWP EXIT events and setup this on post_attach()
and post_startup_inferior().

Stop reinitializing the list of recognized threads in update_thread_list().

Handle LWP CREATE and EXIT events in nbsd_nat_target::wait().

gdb/ChangeLog:

        * nbsd-nat.c (nbsd_enable_proc_events)
        (nbsd_nat_target::post_startup_inferior): Add.
        (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
        (nbsd_nat_target::update_thread_list): Rewrite.
        (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
        "PTRACE_LWP_CREATE".
        * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
gdb/ChangeLog
gdb/nbsd-nat.c
gdb/nbsd-nat.h