From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13473 invoked by alias); 28 Feb 2012 10:03:39 -0000 Received: (qmail 13465 invoked by uid 22791); 28 Feb 2012 10:03:38 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Feb 2012 10:03:26 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1S2Ju1-0006D6-FB from Yao_Qi@mentor.com ; Tue, 28 Feb 2012 02:03:25 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 28 Feb 2012 02:03:06 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Tue, 28 Feb 2012 02:03:24 -0800 Message-ID: <4F4CA669.7040209@codesourcery.com> Date: Tue, 28 Feb 2012 10:14:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Jan Kratochvil CC: Subject: Re: [patch] Fix disp-step-syscall.exp on some i386 targets References: <20120227192228.GA15792@host2.jankratochvil.net> <4F4C874E.7060203@codesourcery.com> <20120228084050.GA1296@host2.jankratochvil.net> In-Reply-To: <20120228084050.GA1296@host2.jankratochvil.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: 2012-02/txt/msg00649.txt.bz2 On 02/28/2012 04:40 PM, Jan Kratochvil wrote: > I do not mind much but it makes some assumption if PC did not change it was by > a syscall without checking it really was a syscall at all. There could be for > example some "jmp *%ebx" with %ebx == _start and it would be falsely relocated > by your patch back to its code location, ignoring its intended jump. The > patch of mine would not relocate it as %orig_eax remained 0. > > But any code messing with the entry point address may confuse this > autodetection anyway so these countercases are more hypothetical. > > What do you think about the %orig_eax verification? It looks reasonable to me then, better than my approach. It would be better if we can add some comments to explain this fix is a hack and why we have to do in this way. -- Yao (齐尧)