binutils-gdb/gdb/common
Hui Zhu c077881afa Fix gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (timeout) with Linux 2.6.32 and older version
https://sourceware.org/ml/gdb-patches/2014-04/msg00047.html

Got gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw)
(timeout) with Linux 2.6.32 and older version.

The rootcause is after the test use "set can-use-hw-watchpoints 0" let GDB
doesn't use hardware breakpoint and set a watchpoint on "global", GDB
continue will keep single step inside function "vfork".
The Linux 2.6.32 and older version doesn't have commit
6580807da14c423f0d0a708108e6df6ebc8bc83d (get more info please goto
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=6580807da14c423f0d0a708108e6df6ebc8bc83d).
When the function "vfork" do syscall, the single step flag TIF_SINGLESTEP
will copy to child process.
Then GDB detach it, child process and parent process will be hanged.

So I make a patch that do a single step before detach.  Then TIF_SINGLESTEP
of child process in old Linux kernel will be cleared before detach.
Child process in new Linux kernel will not be affected by this single step.

2014-06-08  Hui Zhu  <hui@codesourcery.com>

	* common/linux-ptrace.c (linux_disable_event_reporting): New
	function.
	* common/linux-ptrace.h (linux_disable_event_reporting): New
	declaration.
	* linux-nat.c (linux_child_follow_fork): Do a single step before
	detach.
2014-06-08 19:14:06 +08:00
..
agent.c Add new infrun.h header. 2014-05-22 12:29:11 +01:00
agent.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
ax.def Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
break-common.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
btrace-common.h btrace, gdbserver: read branch trace incrementally 2014-01-16 13:11:42 +01:00
buffer.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
buffer.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
common-utils.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
common-utils.h Add ARI (ok) marker for __func__ reference in common-utils.h 2014-01-22 09:03:31 +04:00
common.m4 Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
create-version.sh Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
filestuff.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
filestuff.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
format.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
format.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb_assert.h Move ASSERT_FUNCTION to FUNCTION_NAME. 2014-01-17 10:00:07 -08:00
gdb_locale.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb_signals.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb_thread_db.h Move fallback thread_db.h to a separate file. 2013-04-16 18:14:55 +00:00
gdb_vecs.c Add delim_string_to_char_ptr_vec. 2014-01-17 10:23:29 -08:00
gdb_vecs.h Add delim_string_to_char_ptr_vec. 2014-01-17 10:23:29 -08:00
gdb_wait.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
glibc_thread_db.h Update glibc_thread_db.h from upstream. 2013-04-16 18:17:11 +00:00
host-defs.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
i386-cpuid.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
i386-gcc-cpuid.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
i386-xstate.h Add AVX512 registers support to GDB and GDBserver. 2014-04-24 16:30:03 +02:00
linux-btrace.c convert to_supports_btrace 2014-02-19 07:45:26 -07:00
linux-btrace.h convert to_supports_btrace 2014-02-19 07:45:26 -07:00
linux-osdata.c Fix crash on process name "(sd-pam)" (PR 16594). 2014-02-21 18:39:40 +01:00
linux-osdata.h Change 'len' of linux_common_xfer_osdata to ULONGEST. 2014-01-14 22:20:51 +08:00
linux-procfs.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
linux-procfs.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
linux-ptrace.c Fix gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (timeout) with Linux 2.6.32 and older version 2014-06-08 19:14:06 +08:00
linux-ptrace.h Fix gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (timeout) with Linux 2.6.32 and older version 2014-06-08 19:14:06 +08:00
mips-linux-watch.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mips-linux-watch.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
print-utils.c share "cell" code 2014-02-12 09:59:13 -07:00
print-utils.h share "cell" code 2014-02-12 09:59:13 -07:00
ptid.c Move ptid_match to common/ptid.c. 2014-02-27 14:30:07 +00:00
ptid.h Move ptid_match to common/ptid.c. 2014-02-27 14:30:07 +00:00
queue.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
rsp-low.c update rsp-low comments 2014-02-12 09:59:20 -07:00
rsp-low.h update rsp-low comments 2014-02-12 09:59:20 -07:00
signals.c Remove preprocessor conditionals for ANSI-standard signals 2014-06-06 10:32:12 +01:00
vec.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
vec.h Move ASSERT_FUNCTION to FUNCTION_NAME. 2014-01-17 10:00:07 -08:00
version.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
xml-utils.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
xml-utils.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00