From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93781 invoked by alias); 12 Jan 2017 14:38:22 -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 93756 invoked by uid 89); 12 Jan 2017 14:38:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=print_insn_m68k, 2-byte, 2byte, m68k_scan_mask X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pf0-f196.google.com Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jan 2017 14:38:20 +0000 Received: by mail-pf0-f196.google.com with SMTP id 127so3830788pfg.0; Thu, 12 Jan 2017 06:38:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hdgqCNsyLk5Ww5cKcduPMfuU98E98RyEg3BLJe4/SeE=; b=s59d9ipFn9/OuJk+kwRzA21Vb/kP5xILHB0NLf3AAANeuspl1SKtnZgIuc5vo5zCDD MXWytXoUfO4Gf3AsItdyTC7xr1ZzYFYGO6kx88ZEJKI6/gzbTGGlrhqhSSsG2gA4UyzA l6BZ3lXhraE73cZDFrb7HTCdvznyAGe5xClhXmFRb2jZrpSrmhOHUowmW8VCadL088CO ysGk+iqvbaF5oRVnKgyfANJCpVOiXGDEixRwEeE0IPUkaBAiFMiCshQUDvYUm8DtVsiA Pnld0N0B2wqTX7GL3uiwjE6TU9h0mbVQcWtaI38vhNHPKUR9V/rk8WMHq7WapFTsz9Oh DY4w== X-Gm-Message-State: AIkVDXKg6gWdmGi3fDXdrYmybrQOLf8i4p36iXd48YGj67Ql1uiB2RXFDw0hj95fLNDbyg== X-Received: by 10.99.109.143 with SMTP id i137mr17805150pgc.11.1484231898755; Thu, 12 Jan 2017 06:38:18 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-160-71-80.tyqh2.lon.bigpond.net.au. [58.160.71.80]) by smtp.gmail.com with ESMTPSA id p25sm22330435pfd.0.2017.01.12.06.38.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 06:38:18 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 24BC1C1660; Fri, 13 Jan 2017 01:08:14 +1030 (ACDT) Date: Thu, 12 Jan 2017 14:38:00 -0000 From: Alan Modra To: Yao Qi Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH 6/8] Return -1 on memory error in print_insn_m68k Message-ID: <20170112143813.GK32333@bubble.grove.modra.org> References: <1484051178-16013-1-git-send-email-yao.qi@linaro.org> <1484051178-16013-7-git-send-email-yao.qi@linaro.org> <20170111221514.GI32333@bubble.grove.modra.org> <20170112115021.GB31406@E107787-LIN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112115021.GB31406@E107787-LIN> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2017-01/txt/msg00227.txt.bz2 On Thu, Jan 12, 2017 at 11:50:21AM +0000, Yao Qi wrote: > On 17-01-12 08:45:14, Alan Modra wrote: > > On Tue, Jan 10, 2017 at 12:26:16PM +0000, Yao Qi wrote: > > > * m68k-dis.c (match_insn_m68k): Extend comments. Return -1 > > > if FETCH_DATA returns 0. > > > (m68k_scan_mask): Likewise. > > > (print_insn_m68k): Update code to handle -1 return value. > > > > This misses one FETCH_DATA call, in m68k_scan_mask. > > > > I can't remember the reason I didn't change it. Sorry. Actually there is a good reason not to change that call, I just didn't look at the code well enough and thought you'd accidentally missed it. The previous patch is OK. The newest one would fail if you had a 2-byte insn at the end of a segment and happened to try a 4-byte insn match first. -- Alan Modra Australia Development Lab, IBM