From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 51BD43858403 for ; Wed, 17 Jan 2024 16:39:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51BD43858403 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 51BD43858403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705509579; cv=none; b=PNBFkws0njPR/Wu532RP0uA+Y1qOsC9BfNzrp0fRv7v3gyI6OMKV9DXAdFiH8UeRhntSCqmhDIj6oKSYIW2+86rJ11O9F/vZZ3KGFDVMzUauRaAlHAbx7n9DQQorhb/gUQRxyo3iav11ohuzy8cHUos44CDj6hlIUlX1wg4DuNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705509579; c=relaxed/simple; bh=QNOf5gwgaWqTnXi0Q5oG9Bh2ZYh//7UzLT1OmAH3h7Y=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=Lf/iZrKqNrtg6QAmPk/hnZjeyAKdxjmf6Kx1+sBpZcVOne3czsj+GrvcB4047w93cwAASbQ2ZDxH3wEriNXXruyjTi/8wu+gpfI+ccBkE05XDuK0S+aBwiWCbh0A7CEcDZmNtT+LuZH839PPhgK5WiDMfnP0xq6hr5bXUsyAejU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6002a.ext.cloudfilter.net ([10.0.30.222]) by cmsmtp with ESMTPS id Q4aSrKSMnTHHuQ8wyrw2B1; Wed, 17 Jan 2024 16:39:37 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Q8wyrO8SmD6lhQ8wyrJtR9; Wed, 17 Jan 2024 16:39:36 +0000 X-Authority-Analysis: v=2.4 cv=LNR1/ba9 c=1 sm=1 tr=0 ts=65a802c8 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=dEuoMetlWLkA:10 a=Qbun_eYptAEA:10 a=5y8YgAut4uUOwXUl8TkA:9 a=QEXdDO2ut3YA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9IaLyJVVP0Qz8NDndSNho8G6ttCS5GDNX6G45fZCGds=; b=kxWCqXEL3Jk5Tft9ata3lT46fU DlPZuCDihM9DXasWrRvbnK1NqjNeSXGfR1/Bp3lfdrj5z515WpFSshE+AkKxvMu33YqOrsivyhDk4 JkgObUpXqfieZjSI+DXD8Uy/w; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:56636 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rQ8wx-002OXE-2y for gdb-patches@sourceware.org; Wed, 17 Jan 2024 09:39:35 -0700 From: Tom Tromey Date: Wed, 17 Jan 2024 09:39:29 -0700 Subject: [PATCH v2 01/17] Refactor 'maint set dwarf synchronous' handling MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240117-debug-names-fix-v2-1-dbd5971a9c31@tromey.com> References: <20240117-debug-names-fix-v2-0-dbd5971a9c31@tromey.com> In-Reply-To: <20240117-debug-names-fix-v2-0-dbd5971a9c31@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.157 X-Source-L: No X-Exim-ID: 1rQ8wx-002OXE-2y X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net ([192.168.0.21]) [97.122.68.157]:56636 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfFASUjm2NAhWzklIvi/Lsvf0sxvLJIbpXwxgyLrdh+Uz/ADXh9ylBQPX+fGXf5ynl/bWdF1/9OiN6lPdcZ1xCiRPoC3IAps/P+WP4LBqsJw9UXc7HrUq jvtLOQIF+T4lmPg2dul4tZKJav9MHW1HK5o1I0+QOwkidQixt+koXvG/sDxag9iaBkNRJzzhID6Iab7AXacuCGRa+oIJVeoW5ro= X-Spam-Status: No, score=-3022.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: The new .debug_names reader will reuse the background reading infrastructure of the cooked index code. In order to share the handling of 'maint set dwarf synchronous' -- and to avoid having to export this global -- this patch refactors this to be handled directly in dwarf2_initialize_objfile. --- gdb/dwarf2/read.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 8f2b7a35f27..e0eb1f9ce3c 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -3267,6 +3267,10 @@ dwarf2_initialize_objfile (struct objfile *objfile, global_index_cache.miss (); objfile->qf.push_front (make_cooked_index_funcs (per_objfile)); } + + if (dwarf_synchronous && per_bfd->index_table != nullptr) + per_bfd->index_table->wait_completely (); + return true; } @@ -16920,9 +16924,6 @@ make_cooked_index_funcs (dwarf2_per_objfile *per_objfile) avoids races. */ idx->start_reading (); - if (dwarf_synchronous) - idx->wait_completely (); - return quick_symbol_functions_up (new cooked_index_functions); } -- 2.43.0