mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
* linux-low.c (linux_remove_process): Add `detaching' parameter.
Pass it to thread_db_free. (linux_kill, linux_detach, linux_wait_1): Adjust to pass the proper `detaching' argument to linux_remove_process. * linux-low.h (thread_db_free): Add `detaching' parameter. * thread-db.c (thread_db_init): Pass false as `detaching' argument to thread_db_free. (thread_db_free): Add `detaching' parameter. Only call td_ta_clear_event if detaching from process.
This commit is contained in:
@ -259,12 +259,12 @@ linux_add_process (int pid, int attached)
|
||||
also freeing all private data. */
|
||||
|
||||
static void
|
||||
linux_remove_process (struct process_info *process)
|
||||
linux_remove_process (struct process_info *process, int detaching)
|
||||
{
|
||||
struct process_info_private *priv = process->private;
|
||||
|
||||
#ifdef USE_THREAD_DB
|
||||
thread_db_free (process);
|
||||
thread_db_free (process, detaching);
|
||||
#endif
|
||||
|
||||
free (priv->arch_private);
|
||||
@ -663,7 +663,7 @@ linux_kill (int pid)
|
||||
} while (lwpid > 0 && WIFSTOPPED (wstat));
|
||||
|
||||
delete_lwp (lwp);
|
||||
linux_remove_process (process);
|
||||
linux_remove_process (process, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -752,7 +752,7 @@ linux_detach (int pid)
|
||||
|
||||
delete_all_breakpoints ();
|
||||
find_inferior (&all_threads, linux_detach_one_lwp, &pid);
|
||||
linux_remove_process (process);
|
||||
linux_remove_process (process, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1378,7 +1378,7 @@ retry:
|
||||
struct process_info *process = find_process_pid (pid);
|
||||
|
||||
delete_lwp (lwp);
|
||||
linux_remove_process (process);
|
||||
linux_remove_process (process, 0);
|
||||
|
||||
current_inferior = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user