From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2433 invoked by alias); 8 Mar 2011 23:10:56 -0000 Received: (qmail 2421 invoked by uid 22791); 8 Mar 2011 23:10:55 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 23:10:49 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 1EE6CE023; Tue, 8 Mar 2011 15:10:48 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id 113838EF13; Tue, 8 Mar 2011 15:10:48 -0800 (PST) Message-ID: <4D76B777.4000201@vmware.com> Date: Wed, 09 Mar 2011 01:32:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Pedro Alves CC: Mark Kettenis , "gdb-patches@sourceware.org" , "jan.kratochvil@redhat.com" Subject: Re: [RFA] i386-tdep.c, check target_read_memory for error. References: <4D715BB0.8030506@vmware.com> <201103081858.43441.pedro@codesourcery.com> <201103081925.p28JPKb4008277@glazunov.sibelius.xs4all.nl> <201103081939.38165.pedro@codesourcery.com> In-Reply-To: <201103081939.38165.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2011-03/txt/msg00574.txt.bz2 Pedro Alves wrote: > On Tuesday 08 March 2011 19:25:20, Mark Kettenis wrote: >>> From: Pedro Alves >>> Date: Tue, 8 Mar 2011 18:58:43 +0000 >>> >>> On Tuesday 08 March 2011 18:37:55, Michael Snyder wrote: >>>> @@ -1221,7 +1231,8 @@ i386_skip_noop (CORE_ADDR pc) >>>> if (op == 0x90) >>>> { >>>> pc += 1; >>>> - target_read_memory (pc, &op, 1); >>>> + if (target_read_memory (pc, &op, 1)) >>>> + return pc; >>> I think you're meant to return PC as it was at function >>> start. Note the pc += 1 above. There are other instances >>> in the patch. >> Those are actually fine. Skipping nop instructions is harmless, even >> if we get stuck somewhere in the middle. > > You're right, missed that. OK, committing. Thanks all for the reviews.