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 BA0393838788 for ; Sat, 25 Jun 2022 13:27:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA0393838788 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id ACBFE1E15C; Sat, 25 Jun 2022 09:27:13 -0400 (EDT) Message-ID: <5c9c20f8-2d67-17a8-9d29-65c3a42ecde5@simark.ca> Date: Sat, 25 Jun 2022 09:27:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] Make GDBserver abort on internal error in development mode Content-Language: en-US To: Pedro Alves , gdb-patches@sourceware.org References: <20220624132645.1117504-1-pedro@palves.net> From: Simon Marchi In-Reply-To: <20220624132645.1117504-1-pedro@palves.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 25 Jun 2022 13:27:15 -0000 On 2022-06-24 09:26, Pedro Alves wrote: > Currently, if GDBserver hits some internal assertion, it exits with > error status, instead of aborting. This makes it harder to debug > GDBserver, as you can't just debug a core file if GDBserver fails an > assertion. I've had to hack the code to make GDBserver abort to debug > something several times before. > > I believe the reason it exits instead of aborting, is to prevent > potentially littering the filesystem of smaller embedded targets with > core files. I think I recall Daniel Jacobowitz once saying that many > years ago, but I can't be sure. Anyhow, that seems reasonable to me. Thanks for mentioning this, I was going to ask "why don't we just abort all the time". On non-embedded targets it could be useful to abort, since it triggers the various distros error reporting tool (like ABRT on Red Hat), and make reporting crashes easier. But the embedded target case also makes sense. Your patch LGTM, it's a good change on its own. If someone wants to add a --make-gdbserver-abort-on-internal-error configure switch later (and convince distros to use it), I'd be ok with that. Simon