* Makefile.in (symfile.o): Update.

* NEWS: Mention exec tracing support.
	* inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
	exec events.
	* infcmd.c (kill_if_already_running, detach_command)
	(disconnect_command): Replace SOLIB_RESTART with no_shared_libraries.
	* infrun.c (MAY_FOLLOW_EXEC, may_follow_exec): Delete.
	(follow_exec): Do not check may_follow_exec.  Do not mourn and push
	targets.  Apply the sysroot path to the loaded executable.  Use
	no_shared_libraries.
	* linux-nat.c (linux_child_follow_fork): Print fork following
	messages if verbose.
	(kill_wait_callback): Kill again before waiting a second time.
	* symfile.c (symbol_file_clear): Replace SOLIB_RESTART with
	no_shared_libraries.

	* gdb.base/foll-exec.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.
	(do_exec_tests): Check for systems which do not support catchpoints.
	Do not match START.
	* gdb.base/foll-fork.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.  Enable verbose output.
	(check_fork_catchpoints): New.
	(explicit_fork_child_follow, catch_fork_child_follow)
	(tcatch_fork_parent_follow): Update expected messages.
	(do_fork_tests): Use check_fork_catchpoints.
	* gdb.base/foll-vfork.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.  Enable verbose output.
	(check_vfork_catchpoints): New.
	(vfork_parent_follow_to_bp, tcatch_vfork_then_child_follow): Update
	expected messages.
	(do_vfork_and_exec_tests): Use check_fork_catchpoints.
This commit is contained in:
Daniel Jacobowitz
2008-01-29 22:47:20 +00:00
parent 9db13498bf
commit e85a822c15
11 changed files with 197 additions and 90 deletions

View File

@@ -383,7 +383,7 @@ linux_child_follow_fork (struct target_ops *ops, int follow_child)
/* Detach new forked process? */
if (detach_fork)
{
if (debug_linux_nat)
if (info_verbose || debug_linux_nat)
{
target_terminal_ours ();
fprintf_filtered (gdb_stdlog,
@@ -468,7 +468,7 @@ linux_child_follow_fork (struct target_ops *ops, int follow_child)
/* Before detaching from the parent, remove all breakpoints from it. */
remove_breakpoints ();
if (debug_linux_nat)
if (info_verbose || debug_linux_nat)
{
target_terminal_ours ();
fprintf_filtered (gdb_stdlog,
@@ -2348,11 +2348,18 @@ kill_wait_callback (struct lwp_info *lp, void *data)
do
{
pid = my_waitpid (GET_LWP (lp->ptid), NULL, __WCLONE);
if (pid != (pid_t) -1 && debug_linux_nat)
if (pid != (pid_t) -1)
{
fprintf_unfiltered (gdb_stdlog,
"KWC: wait %s received unknown.\n",
target_pid_to_str (lp->ptid));
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"KWC: wait %s received unknown.\n",
target_pid_to_str (lp->ptid));
/* The Linux kernel sometimes fails to kill a thread
completely after PTRACE_KILL; that goes from the stop
point in do_fork out to the one in
get_signal_to_deliever and waits again. So kill it
again. */
kill_callback (lp, NULL);
}
}
while (pid == GET_LWP (lp->ptid));
@@ -2363,11 +2370,14 @@ kill_wait_callback (struct lwp_info *lp, void *data)
do
{
pid = my_waitpid (GET_LWP (lp->ptid), NULL, 0);
if (pid != (pid_t) -1 && debug_linux_nat)
if (pid != (pid_t) -1)
{
fprintf_unfiltered (gdb_stdlog,
"KWC: wait %s received unk.\n",
target_pid_to_str (lp->ptid));
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"KWC: wait %s received unk.\n",
target_pid_to_str (lp->ptid));
/* See the call to kill_callback above. */
kill_callback (lp, NULL);
}
}
while (pid == GET_LWP (lp->ptid));