From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 965983941C07 for ; Sat, 3 Oct 2020 02:24:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 965983941C07 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3AFB41E58E; Fri, 2 Oct 2020 22:24:13 -0400 (EDT) Subject: Re: [PATCH] gdb: add support for handling core dumps on arm-none-eabi To: Paul Mathieu Cc: gdb-patches@sourceware.org References: From: Simon Marchi Message-ID: <40b649d6-c2a7-5e1b-b411-879280ed79c6@simark.ca> Date: Fri, 2 Oct 2020 22:24:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, 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-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Oct 2020 02:24:33 -0000 On 2020-10-02 8:35 p.m., Paul Mathieu wrote: > Thanks for the feedback Simon! > I did send a new version of that patch as a reply to Luis' feedback, you seem to have commented on the first one. > Should I have sent that patch in a different thread? Ah sorry, I didn't see it buried in your response. It's fine, although doing proper version helps tracking the different versions. > > Some quick comments, just skimming the patch. I won't comment about > indentation issue, because I don't know if it has been modified by the > email client. > > I support what Luis has already said, it needs to be documented what > this format is, where it is defined/specified, who produces it, etc. > > > I'm not sure how (and where) this could be documented, are there examples of such documentation? > Since I couldn't find any prior art for bare metal targets, I went for something that I assumed was a standard core file format. I'm not very well-versed in the domain of core files, but it is my understanding that the format is quite platform dependent. The container is often an ELF file with notes. But the format of those notes' content varies from one platform to another. For example, the layout of how registers are saved in a Linux core file differs from the layout of registers in a FreeBSD core. Similarly, for bare-metal, the tool you are using to generate the core decides of a certain layout, which could be different from the layout chosen by another tool. Therefore, I think it's important to describe what the layout expected by your code is (what tool/platform produces it). It is a good start to document it somewhere in the code. We can then think if it would be relevant to document it in the user manual as well (we'll have a better idea when we understand better where these cores come from). Simon