From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 9DC473858C5F for ; Fri, 3 Feb 2023 15:54:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9DC473858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675439660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UQ5PPxTE7+xwcjbYXghzrOh8hjhJL36a7HeRggipa6g=; b=IhqRus1rBbdyIzusubKdyL31ZH+QQvC8GXh9TXf/2KHYda3ZEyDtfiHtROtTSjEjJOMhvi upZBDYu1QO3F4obKQWHjaFQwfKWxF+wmDCT6jE01ETNd68JnUlAcKr49fpt3gQUYR7vM4X Vk7IwUNR48r6sm+RZFf78ehBA0tJ+Zw= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-646-L4YFR4ISNoa5s7VliUYnMw-1; Fri, 03 Feb 2023 10:54:18 -0500 X-MC-Unique: L4YFR4ISNoa5s7VliUYnMw-1 Received: by mail-qt1-f198.google.com with SMTP id f22-20020a05622a1a1600b003b8674f2302so2818052qtb.7 for ; Fri, 03 Feb 2023 07:54:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UQ5PPxTE7+xwcjbYXghzrOh8hjhJL36a7HeRggipa6g=; b=seORxP+arPUrVw2c+NCuAPz7sWGuC8EVkc7jWe/s8z9LFDOaITwFHfehxKyQ/ReUEJ qUh9T2+bRMilJePC/7bW7/ZORZujorlxTWKTDTRUxhIg/kMI75ePUISqcDyYMmUDEc5P akRypk8RjNGEHlt61rc0pGIasHdZyLrfaado9dpUQ/n/6N8f62GmSYn3Jj7Sn4I3WafM ZzIoFtpGGaUNJWnXc8d51YUdQhboQkp+rXY0oRs4Gioiep3tFdOEZb7KVHptIfZDK5kD p33P4QiMS3K2MV42p30iLHW5+f+DaP8r/rFtpK/jZGsKplJ/z0nqqzUBLmA1Oiq/DXO/ 8YqQ== X-Gm-Message-State: AO0yUKV0UMgp11C+v6iKxu/ikaYujVFOxwyhQ0zyYHsxIYETdSgCc6os eqq503mWAsDwxzrcoV1K5WBXv0r5rbxJMIafTcjzaGDCStDjE7QEbuw2e+xRSHOEWQ+uYavn1zm m6WapgxMDnD9vY9n+nDJHak5AAg0H3f+E99k1J6gfHcgOJrp9R516khgjYnUQLTesRVxY/05qMA == X-Received: by 2002:ac8:7d45:0:b0:3b9:b211:7736 with SMTP id h5-20020ac87d45000000b003b9b2117736mr21130836qtb.19.1675439658293; Fri, 03 Feb 2023 07:54:18 -0800 (PST) X-Google-Smtp-Source: AK7set8fY4qccQJrM98Z3KvBAKzuakkohhEjZ2o04GPvZxqPdlbvL/8G7KGAc+cCRd5feChnXaO2DA== X-Received: by 2002:ac8:7d45:0:b0:3b9:b211:7736 with SMTP id h5-20020ac87d45000000b003b9b2117736mr21130792qtb.19.1675439657953; Fri, 03 Feb 2023 07:54:17 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id c30-20020a05620a201e00b006e07228ed53sm2072804qka.18.2023.02.03.07.54.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 07:54:17 -0800 (PST) From: Andrew Burgess To: Simon Marchi via Gdb-patches , gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH 4/5] gdb: remove copy_inferior_target_desc_info In-Reply-To: <20230203142126.286866-5-simon.marchi@polymtl.ca> References: <20230203142126.286866-1-simon.marchi@polymtl.ca> <20230203142126.286866-5-simon.marchi@polymtl.ca> Date: Fri, 03 Feb 2023 15:54:16 +0000 Message-ID: <871qn6sq1j.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Simon Marchi via Gdb-patches writes: > This function is now trivial, we can just copy inferior::tdesc_info > where needed. I should look ahead before commenting on earlier patches :) Thanks, Andrew > > Change-Id: I25185e2cd4ba1ef24a822d9e0eebec6e611d54d6 > --- > gdb/inferior.c | 2 +- > gdb/infrun.c | 4 ++-- > gdb/target-descriptions.c | 11 ----------- > gdb/target-descriptions.h | 7 ------- > 4 files changed, 3 insertions(+), 21 deletions(-) > > diff --git a/gdb/inferior.c b/gdb/inferior.c > index dfe523664de0..65863440b9c0 100644 > --- a/gdb/inferior.c > +++ b/gdb/inferior.c > @@ -962,7 +962,7 @@ clone_inferior_command (const char *args, int from_tty) > /* If the original inferior had a user specified target > description, make the clone use it too. */ > if (target_desc_info_from_user_p (&inf->tdesc_info)) > - copy_inferior_target_desc_info (inf, orginf); > + inf->tdesc_info = orginf->tdesc_info; > > clone_program_space (pspace, orginf->pspace); > > diff --git a/gdb/infrun.c b/gdb/infrun.c > index edfb5ab0a91f..87ab73c47a4f 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -478,7 +478,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \ > child_inf->attach_flag = parent_inf->attach_flag; > copy_terminal_info (child_inf, parent_inf); > child_inf->gdbarch = parent_inf->gdbarch; > - copy_inferior_target_desc_info (child_inf, parent_inf); > + child_inf->tdesc_info = parent_inf->tdesc_info; > > child_inf->symfile_flags = SYMFILE_NO_READ; > > @@ -546,7 +546,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \ > child_inf->attach_flag = parent_inf->attach_flag; > copy_terminal_info (child_inf, parent_inf); > child_inf->gdbarch = parent_inf->gdbarch; > - copy_inferior_target_desc_info (child_inf, parent_inf); > + child_inf->tdesc_info = parent_inf->tdesc_info; > > if (has_vforked) > { > diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c > index 0561a8098c5c..6defd5bbe863 100644 > --- a/gdb/target-descriptions.c > +++ b/gdb/target-descriptions.c > @@ -459,17 +459,6 @@ target_desc_info_from_user_p (struct target_desc_info *info) > return info != nullptr && !info->filename.empty (); > } > > -/* See target-descriptions.h. */ > - > -void > -copy_inferior_target_desc_info (struct inferior *destinf, struct inferior *srcinf) > -{ > - struct target_desc_info *src = &srcinf->tdesc_info; > - struct target_desc_info *dest = &destinf->tdesc_info; > - > - *dest = *src; > -} > - > /* The string manipulated by the "set tdesc filename ..." command. */ > > static std::string tdesc_filename_cmd_string; > diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h > index c337c177c8e8..b835e144c680 100644 > --- a/gdb/target-descriptions.h > +++ b/gdb/target-descriptions.h > @@ -48,13 +48,6 @@ void target_clear_description (void); > > const struct target_desc *target_current_description (void); > > -/* Copy inferior target description data. Used for example when > - handling (v)forks, where child's description is the same as the > - parent's, since the child really is a copy of the parent. */ > - > -void copy_inferior_target_desc_info (struct inferior *destinf, > - struct inferior *srcinf); > - > /* Returns true if INFO indicates the target description had been > supplied by the user. */ > > -- > 2.39.1