From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8044 invoked by alias); 4 Jun 2019 16:36:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8029 invoked by uid 89); 4 Jun 2019 16:36:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:sk:client-, HX-Languages-Length:704, H*UA:Macintosh X-HELO: mx2.freebsd.org Received: from mx2.freebsd.org (HELO mx2.freebsd.org) (8.8.178.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Jun 2019 16:36:10 +0000 Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 80DEA80F1C; Tue, 4 Jun 2019 16:36:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97BC6716F8; Tue, 4 Jun 2019 16:36:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id EE0051FFC1; Tue, 4 Jun 2019 16:36:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: [PATCH] gdb/riscv: Don't error when decoding a 6 or 8 byte instruction To: Andrew Burgess , gdb-patches@sourceware.org Cc: Jim Wilson , Palmer Dabbelt References: <20190604115054.25306-1-andrew.burgess@embecosm.com> From: John Baldwin Openpgp: preference=signencrypt Message-ID: <644e82ee-6c4e-f01a-4cd7-f202b327366d@FreeBSD.org> Date: Tue, 04 Jun 2019 16:36:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190604115054.25306-1-andrew.burgess@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 97BC6716F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00065.txt.bz2 On 6/4/19 4:50 AM, Andrew Burgess wrote: > If the RISC-V prologue scanner finds a 6 or 8 byte instruction we > currently throw an internal error, which is not great for the user. > > A mechanism already exists in the prologue scanner to leave > instructions marked as unknown so that we can stop the prologue scan > without raising an error, this is used for all 2 and 4 byte > instructions that are not part of the small set the prologue scanner > actually understands. > > This commit changes GDB so that all 6 and 8 byte instructions are > marked as unknown, rather than causing an error. Looks good to me. -- John Baldwin