binutils-gdb/gdb/nat
Pedro Alves 4a6ed09b0f Remove support for LinuxThreads and vendor 2.4 kernels w/ backported NPTL
Since we now rely on PTRACE_EVENT_CLONE being available (added in
Linux 2.5.46), we're relying on NPTL.

This commit removes the support for older LinuxThreads, as well as the
workarounds for vendor 2.4 kernels with NPTL backported.

 - Rely on tkill being available.

 - Assume gdb doesn't get cancel signals.

 - Remove code that checks the LinuxThreads restart and cancel signals
   in the inferior.

 - Assume that __WALL is available.

 - Assume that non-leader threads report WIFEXITED.

 - Thus, no longer need to send signal 0 to check whether threads are
   still alive.

 - Update comments throughout.

Tested on x86_64 Fedora 20, native and gdbserver.

gdb/ChangeLog:

	* configure.ac: Remove tkill checks.
	* configure, config.in: Regenerate.
	* linux-nat.c: Remove HAVE_TKILL_SYSCALL check.  Update top level
	comments.
	(linux_nat_post_attach_wait): Remove 'cloned' parameter.  Use
	__WALL.
	(attach_proc_task_lwp_callback): Don't set the cloned flag.
	(linux_nat_attach): Adjust.
	(kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
	to 'kill'.
	(linux_handle_extended_wait): Use __WALL.  Don't set the cloned
	flag.
	(wait_lwp): Use __WALL.  Update comments.
	(running_callback, stop_and_resume_callback): Delete.
	(linux_nat_filter_event): Don't stop and resume all lwps. Don't
	check if the event LWP has previously exited.
	(check_zombie_leaders): Update comments.
	(linux_nat_wait_1): Use __WALL.
	(kill_wait_callback): Don't handle clone processes separately.
	Use __WALL instead.
	(linux_thread_alive): Delete.
	(linux_nat_thread_alive): Return true as long as the LWP is in the
	LWP list.
	(linux_nat_update_thread_list): Assume the kernel supports
	PTRACE_EVENT_CLONE.
	(get_signo): Delete.
	(lin_thread_get_thread_signals): Remove LinuxThreads references.
	No longer check __pthread_sig_restart / __pthread_sig_cancel in
	the inferior.
	* linux-nat.h (struct lwp_info) <cloned>: Delete field.
	* linux-thread-db.c: Update comments.
	(_initialize_thread_db): Remove LinuxThreads references.
	* nat/linux-waitpid.c (my_waitpid): No longer emulate __WALL.
	Pass down flags unmodified.
	* linux-waitpid.h (my_waitpid): Update documentation.

gdb/gdbserver/ChangeLog:

	* linux-low.c (linux_kill_one_lwp): Remove references to
	LinuxThreads.
	(kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
	to 'kill'.
	(linux_init_signals): Delete.
	(initialize_low): Adjust.
	* thread-db.c (thread_db_init): Remove LinuxThreads reference.
2015-12-17 14:20:51 +00:00
..
aarch64-linux-hw-point.c [AArch64] Only check breakpoint alignment on inserting 2015-11-27 14:53:32 +00:00
aarch64-linux-hw-point.h [aarch64] Check region OK for HW watchpoint in GDBserver 2015-09-03 14:01:49 +01:00
aarch64-linux.c aarch64 multi-arch (part 3): get thread area 2015-09-18 13:59:42 +01:00
aarch64-linux.h aarch64 multi-arch (part 3): get thread area 2015-09-18 13:59:42 +01:00
gdb_ptrace.h C++: handle glibc's ptrace(enum __ptrace_request, ...) 2015-07-24 15:12:15 +01:00
gdb_thread_db.h Protect nat/gdb_thread_db.h against multiple inclusion. 2015-08-05 16:30:57 +02:00
glibc_thread_db.h Move shared native target specific code to gdb/nat 2014-06-20 14:06:48 +01:00
linux-btrace.c Add mmap casts in linux-btrace.c 2015-10-23 19:54:09 -04:00
linux-btrace.h btrace: kernel address filtering 2015-09-09 10:35:35 +02:00
linux-namespaces.c Fix stale cleanup left by linux_mntns_access_fs 2015-08-21 16:56:22 +01:00
linux-namespaces.h Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
linux-nat.h Move __SIGRTMIN. 2015-10-26 13:30:57 -07:00
linux-osdata.c Add casts to memory allocation related calls 2015-09-25 14:08:06 -04:00
linux-osdata.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-personality.c Fix nat/linux-personality.c regression on RHEL-5 2015-01-16 11:42:28 -05:00
linux-personality.h Move code to disable ASR to nat/ 2015-01-15 15:10:49 -05:00
linux-procfs.c Display names of remote threads 2015-11-26 10:50:08 -05:00
linux-procfs.h Display names of remote threads 2015-11-26 10:50:08 -05:00
linux-ptrace.c Replace (void *) cast with (gdb_byte *) 2015-10-24 18:36:26 -04:00
linux-ptrace.h Extended-remote follow-exec 2015-09-11 11:12:46 -07:00
linux-waitpid.c Remove support for LinuxThreads and vendor 2.4 kernels w/ backported NPTL 2015-12-17 14:20:51 +00:00
linux-waitpid.h Remove support for LinuxThreads and vendor 2.4 kernels w/ backported NPTL 2015-12-17 14:20:51 +00:00
mips-linux-watch.c Mostly trivial enum fixes 2015-07-31 13:19:53 -04:00
mips-linux-watch.h Mostly trivial enum fixes 2015-07-31 13:19:53 -04:00
ppc-linux.c Detect 64-bit-ness in PowerPC Book III-E 2015-01-14 22:28:27 +08:00
ppc-linux.h Detect 64-bit-ness in PowerPC Book III-E 2015-01-14 22:28:27 +08:00
x86-cpuid.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
x86-dregs.c C++ keyword cleanliness, mostly auto-generated 2015-02-27 16:33:07 +00:00
x86-dregs.h Add x86_debug_reg_state to gdbserver 2015-03-24 14:05:43 +00:00
x86-gcc-cpuid.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
x86-linux-dregs.c Linux: sys/ptrace.h -> nat/gdb_ptrace.h everywhere 2015-07-24 15:14:47 +01:00
x86-linux-dregs.h Move low-level Linux x86 debug register code to a shared file 2015-03-24 14:05:45 +00:00
x86-linux.c Move duplicated Linux x86 code to nat/x86-linux.c 2015-03-24 14:05:45 +00:00
x86-linux.h Move duplicated Linux x86 code to nat/x86-linux.c 2015-03-24 14:05:45 +00:00