From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 46EE63858402 for ; Wed, 4 Oct 2023 02:25:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46EE63858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 3942P8te026380 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Oct 2023 22:25:13 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 3942P8te026380 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1696386313; bh=hNlXR6Q5FcSrWUkch4WjTknCGon5ayusW2OqCKs6VR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y2dSf8WcdseO9OTcvdYyALuRn60tC+sbsAbFXAyN305dFgtLEA7TEfPLi9ezUgC0x s2E9VQq5HxEXEquZ2QY8FpFhSFjApfCUH4yuFLokaYn4RWMuXVQSiOfi4XQsFOGWmS bMAY91sQg8SDXzB/h9T8LH6HFMbLvH4wHkiK+puQ= Received: from simark.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7BB1C1E092; Tue, 3 Oct 2023 22:25:08 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 8/8] gdb: use objfile->pspace in free_objfile observers Date: Tue, 3 Oct 2023 22:20:23 -0400 Message-ID: <20231004022305.298534-9-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231004022305.298534-1-simon.marchi@polymtl.ca> References: <20231004022305.298534-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 4 Oct 2023 02:25:08 +0000 X-Spam-Status: No, score=-3188.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,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: From: Simon Marchi Use objfile->pspace instead of current_program_space. Change-Id: I127a1788e155b321563114452ed5b530f1d1f618 --- gdb/solib.c | 2 +- gdb/symfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/solib.c b/gdb/solib.c index f914822d2096..5280e5ffefd7 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -1739,7 +1739,7 @@ remove_user_added_objfile (struct objfile *objfile) { if (objfile != 0 && objfile->flags & OBJF_USERLOADED) { - for (struct so_list *so : current_program_space->solibs ()) + for (struct so_list *so : objfile->pspace->solibs ()) if (so->objfile == objfile) so->objfile = NULL; } diff --git a/gdb/symfile.c b/gdb/symfile.c index c2779681cd21..e3228d1925f0 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -3736,7 +3736,7 @@ static void symfile_free_objfile (struct objfile *objfile) { /* Remove the target sections owned by this objfile. */ - current_program_space->remove_target_sections (objfile); + objfile->pspace->remove_target_sections (objfile); } /* Wrapper around the quick_symbol_functions expand_symtabs_matching "method". -- 2.42.0