mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-28 22:21:26 +08:00
Remove unnecessary call to get_thread_db_info
In thread_db_detach, we call get_thread_db_info to first check if there exists a thread_db_info entry for the pid to detach. If there is, then we call delete_thread_db_info. It's unnecessary to call get_thread_db_info in the first place, since delete_thread_db_info handles the case where no thread_db_info entry exist for the given pid. gdb/ChangeLog: * linux-thread-db.c (thread_db_detach): Remove call to delete_thread_db_info.
This commit is contained in:
@ -1093,12 +1093,8 @@ static void
|
||||
thread_db_detach (struct target_ops *ops, const char *args, int from_tty)
|
||||
{
|
||||
struct target_ops *target_beneath = find_target_beneath (ops);
|
||||
struct thread_db_info *info;
|
||||
|
||||
info = get_thread_db_info (ptid_get_pid (inferior_ptid));
|
||||
|
||||
if (info)
|
||||
delete_thread_db_info (ptid_get_pid (inferior_ptid));
|
||||
delete_thread_db_info (ptid_get_pid (inferior_ptid));
|
||||
|
||||
target_beneath->to_detach (target_beneath, args, from_tty);
|
||||
|
||||
|
Reference in New Issue
Block a user