From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TAweIaNlCmiriQMAWB0awg (envelope-from ) for ; Thu, 24 Apr 2025 12:24:03 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tPpn39yH; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 71A2B1E0C3; Thu, 24 Apr 2025 12:24:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 ESMTPS id 5711C1E0C0 for ; Thu, 24 Apr 2025 12:24:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D409A3858D3C for ; Thu, 24 Apr 2025 16:24:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D409A3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1745511841; bh=STF0QadxmoL0Cvz4s6Qm9/kZcGeIc/XRlIX00sePc7I=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=tPpn39yHgjxiEJTSuH9zBQ2o2Auh0rWX/lWUQ3qefKcEf8WL11+y06vyNQoQn77+S gKJRd+pHqvTLNDG7TygSmjbP1IULRcUU++tL9O24RRISjHgzx9MJAvIZ7TJuWtbTil lP0kwW0hmVxtzItlJyx/w82PxQfGdG1GaBogXL5Q= Received: from mail.viric.name (mail.viric.name [37.18.133.75]) by sourceware.org (Postfix) with ESMTPS id 260BA3858D35 for ; Thu, 24 Apr 2025 16:23:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 260BA3858D35 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 260BA3858D35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745511782; cv=none; b=lsutXjMd1DlqKR7qx4Z6JFmjjy+npodC0aYtIZ5vxq8ebfu1FWW5kzzJ8vFLG/VlU83Xec7u8wIvTLmgz6w1L/KQivNIElnuSIniu8Uf/Jbld8W1mFVIKYfYmvI3ak4i90aoSN6xOZuPHpgC4sHPHvQS6h6rllZx6OwjD5LQ2zk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745511782; c=relaxed/simple; bh=VFS2XH5wLk6UR1j8AmMe8j35jD6xaX4QtoGOeUwAR/o=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Q1b4hDUyeEenIygnWOWOTuSKClu+pEUcheVdFHgwp0s/xUBeThUy+aY7r6WqlVCsnf0t4ALpDkUqS1YqHWjTD0lVFCmKjxxvsAb7UxM5pn/cOSXLRM0aVVjyFyub2Aioi0QSuje4JAj6ylctPhXvwWc4R84SVZ6DIu9Rnb3JgZM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 260BA3858D35 Received: by mail.viric.name (Postfix, from userid 1000) id B07C01AA5A9F; Thu, 24 Apr 2025 18:23:00 +0200 (CEST) Date: Thu, 24 Apr 2025 18:23:00 +0200 To: Luis Machado Cc: gdb@sourceware.org Subject: Re: sysroot and coredump debugging Message-ID: X-Accept-Language: ca, es, eo, ru, en, jbo, tokipona References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Llu=C3=ADs_Batlle_i_Rossell_via_Gdb?= Reply-To: =?utf-8?B?TGx1w61z?= Batlle i Rossell Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Thu, Apr 24, 2025 at 03:01:56PM +0100, Luis Machado wrote: > On 4/23/25 14:06, Lluís Batlle i Rossell via Gdb wrote: > > I expect that I can run this in my development computer, after downloading > > the core dump from the target system: > > (gdb) set sysroot /mysysroot > > (gdb) file myelf # it has debug info > > (gdb) core-file core > > > > And this never works; it drops the file with the symbols, thinking it's > > unrelated to the core dump: > > > > warning: Can't open file /home/user/myelf during file-backed mapping note > > processing > > warning: core file may not match specified executable file. > > Unfortunately I think this is an area where improvements could be made. I know > we have "substitute-path", but that's only for sources. In theory setting sysroot > should work, but it doesn't seem to. > > We want gdb to be strict about making sure the core file matches the ELF file, but > we could have some adjustability here. The "same absolute path" is never required when debugging core dumps without sysroot, for dump/elf matching. Why does the sysroot introduce that requirement? It looks like there is a small mistake somewhere, rather than intended behavior.