From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by sourceware.org (Postfix) with ESMTPS id 79E513858C52 for ; Thu, 28 Sep 2023 18:17:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79E513858C52 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-xd2f.google.com with SMTP id ca18e2360f4ac-7927f24140eso456378639f.2 for ; Thu, 28 Sep 2023 11:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1695925045; x=1696529845; 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=hUOo0vUNqJS3taNKhUlEYIC0zue5GEuoc4rIh86qCcU=; b=iE4bJRcu+R1NWAsIzG8a7ZpcEjvgQR59VJOhfwI95zPaipokQgL0p8gehRFQR4+Vn5 RJzo7iH+zRJsj647BLlA28IuBdko1Ya5SKg2mXRpJPOUgLGJFJxV1yekzoCV4BNY8RRA GaOMLT0CN0mcjkO233GBIY5WXL9ce7krtpjbcETLbn5TBswhPIWkvZZ2vIQhvvLyD+Na lyplTqAado9WyCCrus0tVRWA8sDBW4w7OurDawLnh9WJI3g0IxY3k5LoHdsjdqs4Ypw8 koQ12BCWB/MzTTdHu+XPSfMv2fiIoTfmK8HEzgrAN7sASc6WZ4c0w2gxjKyloYyALN3V CU7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695925045; x=1696529845; 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=hUOo0vUNqJS3taNKhUlEYIC0zue5GEuoc4rIh86qCcU=; b=Co7XC673wT63G6YAfeqoIYF/cqA6huTx8RbiwF9AkXdxE/NvDK7xghlRDgGqvL8uKq L5wUlvVJ0wlJEgVzl0Egqwhgc4AIQbeebyGH8+cDyoSBwPp3ExeTdIiC4qmsnK3Ska8Z dm3MScP38fTb01NaWy7X+OvA6pnqNHIfmjFIG6BvLcNZgN26S1M+Jco2E0XDLOsKqdzL vYsUwn21byT7MKumuFdQe5dZ3sg0z84RKcMC/QerhdJsKrFzemtOYx/DnltDjzKbrUNA YWMo6iomUsdopV/AaMAtNZ2dJJ82FC2/kb//WPWxJP45TZ2Q1mXyLQy8d/wWD/ICv3YL j/wQ== X-Gm-Message-State: AOJu0Yx/dUawI0F1iSa7La+Zek+hiIPd/roxhvoQbvfaxWkirmXmlm/q biSbph8fg2+axASbYmmri+KL0z0M2JzZhG4pH42IAQ== X-Google-Smtp-Source: AGHT+IGz5cvKo1oMnalf80QESdeS09hYj1ci5GBCm5de/mqlH4vvc5Vo7eM8hpmIUTaiBXiLR1nmjw== X-Received: by 2002:a05:6602:225a:b0:786:7100:72de with SMTP id o26-20020a056602225a00b00786710072demr2330631ioo.16.1695925044561; Thu, 28 Sep 2023 11:17:24 -0700 (PDT) Received: from murgatroyd (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id y21-20020a056638015500b0042b48d372aasm4775552jao.100.2023.09.28.11.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 11:17:24 -0700 (PDT) From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCHv2 5/5] gdb: fix reread_symbols when an objfile has target: prefix References: X-Attribution: Tom Date: Thu, 28 Sep 2023 12:17:23 -0600 In-Reply-To: (Andrew Burgess's message of "Thu, 28 Sep 2023 15:00:44 +0100") Message-ID: <87il7u2mdo.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.5 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> I didn't 100% understand the issues discussed in that thread, however, Andrew> I think the problem with the previous thread related to the changes in Andrew> gdb_bfd.c, rather than to the change in symfile.c. As such, I think Andrew> this change might be acceptable, my reasoning is: Andrew> - the objfile::mtime field is set by a call to bfd_get_mtime (see Andrew> objfiles.c), which calls bfd_stat under the hood. This will end Andrew> up using the system stat, Andrew> - In symfile.c we currently call stat directly, which will call the Andrew> gnulib stat, which, if I understand the above thread correctly, Andrew> might give a different result to the system stat in some cases, Andrew> - By switching to using bfd_stat in symfile.c we should now be Andrew> consistently calling the system stat, The BFD cache (in gdb_bfd.c) uses fstat, so I think there would still be a problem here. Tom