From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by sourceware.org (Postfix) with ESMTPS id A969F3858C5E for ; Mon, 2 Oct 2023 14:16:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A969F3858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7a25040faffso237261439f.1 for ; Mon, 02 Oct 2023 07:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1696256213; x=1696861013; darn=sourceware.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=HRa2/nIgsOQqjlWjhEUNd5JPNI9A45kMaJjqM60znkA=; b=lO5VtU2CbcuQeeQ9CJ6Ib3D6zOqBzcUBOQbNVE9LvGn+Y7Riuw8g8RlqgtBA6HARQU WjcejQDFTHYIb76PcVzdPyAWgxM8HXnVg4NY/u+BmgV/oEaACkVZbDDFOJvhLIOZAYnt 6qyK096vb3RX5FjrYP9va/6Ac/8LPKHz5/dsmfLJ5H6KuIvovPxvQuBiuFyMfW6bAhzq ckXPxKJJtSbjfzS+kOrbOqyeOqPxguBdhH6Q3U940faPEn3bmjB0x9K9SGjACQ3eLUUL eAU+m420lDLKgVLUe3wxxyJZC++CaXvCxE/NQf04Wch6C+frGHarNBWlDQzXt8ahWvV5 PoOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696256213; x=1696861013; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HRa2/nIgsOQqjlWjhEUNd5JPNI9A45kMaJjqM60znkA=; b=Av4wNPi4cgD1jMahP1KaRHsd1n5h1UZd6aa6me5OBo852Rv9KEUx3unid9rPA068av 5++d7IuTBIJp/1XIEWRtLf0dj+baj6QDWHokLLSMlIoLg4U4xK2jjAmYbDqxyWb+v7tp Ws9zm1BX2qHGLn6FwnxWLrnU6SO+qK9bsWzx5Kau/ozPTLoOOFlwpSiPEm6NiFLIFVj5 sYCBoCAd1X7xLL51YcWiFJbZxsA1mgDFkgEbddiUmSrBtWnz+TIYcoYE1uHIHyvkLvUw G7Zqaak2QC15rquhFS4zxDqYU7ahhqkrvCPdHVUPv9jrrX7kKGCY7wHEuwrNbIvanr9I Z4jg== X-Gm-Message-State: AOJu0Yy61rvWF3MtOfmW6IRYNIzKCoEZ/c6rzn0IPqviQ8AUNDh0PhdE OyPsBAZjvsiOmSFSYvP32/RHIQ== X-Google-Smtp-Source: AGHT+IFY+hwLlbVrDhuIeaJlGVXr5LAD1Nv48D3S0HqnQ16dykhf69kiSLfveSksTNZQpXhABz0UlA== X-Received: by 2002:a05:6602:86:b0:787:1d0a:ce81 with SMTP id h6-20020a056602008600b007871d0ace81mr13123893iob.13.1696256212828; Mon, 02 Oct 2023 07:16:52 -0700 (PDT) Received: from murgatroyd (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id br14-20020a05663846ce00b0042b14d9be7bsm7061201jab.22.2023.10.02.07.16.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:16:52 -0700 (PDT) From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , Andrew Burgess via Gdb-patches Subject: Re: [PATCH 9/9] gdb: use reopen_exec_file from reread_symbols References: <87msxi8dcv.fsf@tromey.com> <877coawcd9.fsf@redhat.com> <87msx62mh5.fsf@tromey.com> <87sf6xuvvb.fsf@redhat.com> X-Attribution: Tom Date: Mon, 02 Oct 2023 08:16:51 -0600 In-Reply-To: <87sf6xuvvb.fsf@redhat.com> (Andrew Burgess's message of "Fri, 29 Sep 2023 11:17:12 +0100") Message-ID: <87pm1x154c.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: >>>>> "Andrew" == Andrew Burgess writes: Andrew> 1. When GDB is sat idle at a prompt, and Andrew> 2. When GDB is blocked waiting for an inferior event. Andrew> Having a bfd_cache_close_all call in e.g. reopen_exec_file, seems pretty Andrew> pointless really, as it's not impossible that GDB will then immediately Andrew> re-open the BFD from some other function. Andrew> I wonder if we should remove all bfd_cache_close_all calls, and just Andrew> have two calls associated with the two states above? I'm a little wary of #1 because I'm working on a patch series to move DWARF reading into the background. That is, reading would be happening while the prompt is visible. Maybe the DWARF reader should be calling bfd_cache_close when it knows it is done with a particular BFD. I think really all that's needed is to have it open while mapping the debug sections. I suppose the lack of this code in gdbserver is just another local/remote divergence that nobody has ever noticed. Tom