Add gdb/nat common functions for listing threads
Add netbsd_nat::netbsd_thread_lister a generic thread lister, used
internally in netbsd-nat.c, copied from gdb/nbsd-nat.c.
Add public extern functions for listing threads:
* netbsd_nat::thread_alive
* netbsd_nat::thread_name
* netbsd_nat::for_each_thread
gdb/ChangeLog:
* netbsd-nat.h: Include "gdbsupport/function-view.h".
* (netbsd_nat::thread_alive, netbsd_nat::thread_name)
(netbsd_nat::for_each_thread): Add.
* netbsd-nat.c: Include "gdbsupport/common-defs.h" and
"gdbsupport/common-debug.h".
* (netbsd_nat::netbsd_thread_lister)
(netbsd_nat::thread_alive, netbsd_nat::thread_name)
(netbsd_nat::for_each_thread): Add.