From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsec103.isp.belgacom.be (mailsec103.isp.belgacom.be [195.238.20.99]) by sourceware.org (Postfix) with ESMTPS id 029FF3945060 for ; Wed, 8 Apr 2020 20:54:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 029FF3945060 IronPort-SDR: itBqzZLDMPUmE/AI/z8bAxnthVEviqLHE+cpQ1sUL9bY3uUJlybinsYrKkdmRtLUwSeOnnk58S FPohC/SO3mEWSqSqm8PWmtWVFMjmpMIULLDC0AWVFtEmwG49iSr1JHEXVRsMndCUW77EvnT51K GUJieyK5yMky3sDYGnb7tW5c8MFejTCBC/w+Lu4IUYn9FopVbXANci00lVQGhtF9Mtm96ogLNC zI0nb2S/4Pwjf8Nam2u0mti5nLcnSg9Lvn4RLJmRq5zTMnRTGtI9UkRDW9p3trnLDdviar7oQF N/c= IronPort-PHdr: =?us-ascii?q?9a23=3AcyNP6RQHHozOoSWAO7lWNOIa+9psv+yvbD5Q0Y?= =?us-ascii?q?Iujvd0So/mwa67ZBSBt8tkgFKBZ4jH8fUM07OQ7/m9HzVfqs/c6zhCKMUKC0?= =?us-ascii?q?ZZz51O3kQJO42sNw7SFLbSdSs0HcBPBhdO3kqQFgxrIvv4fEDYuXao7DQfSV?= =?us-ascii?q?3VPAtxIfnpSMaJ15zkn++99IfObApWmTGzfa19LAmsrQXWq8IanZZuJrw+xx?= =?us-ascii?q?fUonZEYflayGFnKV6Onxvx6Nq78Jp//yhNof4s+NNMXKrgc6gkUbBUCSktPn?= =?us-ascii?q?wo6sHsqRTMQgyD62cGXG4LiBRIGQ/F7B/7Xpf1rCT3s/d21TeZM8PrU706QC?= =?us-ascii?q?yu4Kh3RhDmjicHLCM5/3rMisNslqJboQmuqAJ5zoXJfYyaLvt+fqfafdMHWW?= =?us-ascii?q?pMW9taWiJdDo+gaYYEEvEMNvhEoYbju1QOrAO+BQiyC+Pp1j9InWL90akj3+?= =?us-ascii?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YolV4/X8pCL3aOna?= =?us-ascii?q?1u8QXPQYTExRbK3522fLgRiXaevFyIynCD6QQBCFZ9?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BQAwCGOY5e/yFRiNlgBhwBAQEBAQc?= =?us-ascii?q?BAREBBAQBAYF7gilsdRIqhByJAYgPm0kKAQEBAQEBAQEBCCMJAQIEAQGERAK?= =?us-ascii?q?CBCc4EwIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKhFEhAQMBAQUKATcMgjs?= =?us-ascii?q?pAYMLAQEBAQIBIw8BIygLCAMYAgImAgJXBgGDOYJcJAuwGnWBMoVMg1aBOQa?= =?us-ascii?q?BDiqFIw2HEoFMP4NsNT6CZwQagTmDIoI8IgSOC6IregeCQHwEhnWPQB2cCI8?= =?us-ascii?q?8iSiTK4FpIoFXbYM9TyWaKYVDQjCBIQgTi1UtghQBAQ?= X-IPAS-Result: =?us-ascii?q?A2BQAwCGOY5e/yFRiNlgBhwBAQEBAQcBAREBBAQBAYF7g?= =?us-ascii?q?ilsdRIqhByJAYgPm0kKAQEBAQEBAQEBCCMJAQIEAQGERAKCBCc4EwIDAQEBA?= =?us-ascii?q?wIFAQEGAQEBAQEBBAQBbAQBAQcKhFEhAQMBAQUKATcMgjspAYMLAQEBAQIBI?= =?us-ascii?q?w8BIygLCAMYAgImAgJXBgGDOYJcJAuwGnWBMoVMg1aBOQaBDiqFIw2HEoFMP?= =?us-ascii?q?4NsNT6CZwQagTmDIoI8IgSOC6IregeCQHwEhnWPQB2cCI88iSiTK4FpIoFXb?= =?us-ascii?q?YM9TyWaKYVDQjCBIQgTi1UtghQBAQ?= Received: from 33.81-136-217.adsl-dyn.isp.belgacom.be (HELO md) ([217.136.81.33]) by relay.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 08 Apr 2020 22:54:19 +0200 Message-ID: Subject: Re: exec-file-mismatch and native-gdbserver testing From: Philippe Waroquiers To: "Metzger, Markus T" , GDB Date: Wed, 08 Apr 2020 22:54:18 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 20:54:23 -0000 On Wed, 2020-04-08 at 14:02 +0000, Metzger, Markus T via Gdb wrote: > Hello, > > I noticed an issue when running tests that use standard_temp_file with the native-gdbserver board. > > In gdb_remote_download, when called without tofile argument, as it is, for example, when starting gdbserver via gdb_reload, we set the filename to standard_output_file [file tail $fromfile] and copy the file. > > GDB and gdbserver now use a copy of the same file at different locations. > > This triggers an exec-file-mismatch warning and, with the default “ask” setting, a user prompt that isn’t handled by the tests and eventually leads to a timeout. This can be seen with all tests that use gdb_simple_compile, e.g. via skip_*_test calls. An example would be gdb.btrace/*.exp. > > In exec.c:validate_exec_file (), we check the filenames and, if they differ, print a warning and re-load the symbol file. > > Should validate_exec_file () check more than just the filenames? You mean: if the filenames differs, gdb could compare the contents of files and if equal, not ask the question, considering there is no mismatch ? > Should gdb_simple_compile use standard_output_file instead of standard_temp_file? Alternatively, set the value of exec-file-mismatch to warn ? The reason of this setting is to allow to disable this exec-file-mismatch logic in case of "unusual" setup, and the above seems to qualify as an unusual setup. During review, some argued that we might hardcode 'ask' (or even not ask, just automatically reload). It looks like the setting might have its usefulness :). Note that on this exec-file-mismatch functionality, we still have PR https://sourceware.org/bugzilla/show_bug.cgi?id=25475 waiting for (some) feedback about the way to fix/improve (this PR should better be fixed before the next release, as afterwards, CLI behaviour is much more difficult to change). Thanks Philippe