From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NI8bJ9clkl+YTwAAWB0awg (envelope-from ) for ; Thu, 22 Oct 2020 20:37:43 -0400 Received: by simark.ca (Postfix, from userid 112) id 942691E89B; Thu, 22 Oct 2020 20:37:43 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E8CD21E58E for ; Thu, 22 Oct 2020 20:37:42 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 73BBB386EC43; Fri, 23 Oct 2020 00:37:42 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4F788385781A for ; Fri, 23 Oct 2020 00:37:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4F788385781A 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 DE8C01E58E; Thu, 22 Oct 2020 20:37:39 -0400 (EDT) Subject: Re: [PATCH] gdb: add support for handling core dumps on arm-none-eabi To: Fredrik Hederstierna , Paul Mathieu References: <688f8081-e972-2ca1-255a-14b63e9e173d@simark.ca> From: Simon Marchi Message-ID: Date: Thu, 22 Oct 2020 20:37:39 -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-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: , Cc: "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-10-22 6:32 p.m., Fredrik Hederstierna via Gdb-patches wrote: >> From: Simon Marchi >> Sent: Thursday, October 22, 2020 3:49 AM >> I've rebased your patch on top of master and made the necessary changes >> to make it build (the equivalent changes that I did to linux-tdep.c and >> fbsd-tdep.c). >> >> You can find it on the users/simark/arm-none-core-file branch upstream: > > Looks great, thanks Simon, I have no futher changes to be made, > what is next step, are we near for this to being mergable? > The features regarding eg FreeRTOS could be added later on top of this I guess. > The format of the corefile right now is exactly as Linux, minus all '*ix' stuff, > only threads, registers and memory I think. What is next step on this? On my side, from the comments I gave earlier and other observations: - there area clearly some unnecessary includes, cut it down to what's necessary - don't put things in the header file if they are only used in the source file (the macros in arm-none-tdep.h, for example) - none_init_corefile has an unused parameter - some unnecessary forward declarations here and there - is the handling of inferior arguments relevant for bare-metal? - if it works with the GDB simulator (target sim), I'd really like if we could have a test for this: generate a core, read it back, make sure you can print stuff Luis and Alan (both GDB ARM maintainers) also expressed the desire to have the format documented. Alan suggested a section in the GDB manual, in the ARM-specific section. I think it is a good idea. This is important, so we have something to point to when people ask "what format should I generate so GDB can read it". Simon