From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5140 invoked by alias); 22 May 2013 10:06:21 -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 5130 invoked by uid 89); 22 May 2013 10:06:21 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 10:06:20 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Uf5w2-00052M-R1 from Yao_Qi@mentor.com ; Wed, 22 May 2013 03:06:18 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 22 May 2013 03:06:19 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Wed, 22 May 2013 03:06:18 -0700 Message-ID: <519C98AE.1090106@codesourcery.com> Date: Wed, 22 May 2013 10:06:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 3/7] range stepping: gdbserver on x86/linux References: <1363006291-13334-1-git-send-email-yao@codesourcery.com> <1363006291-13334-4-git-send-email-yao@codesourcery.com> <519282CB.4030800@redhat.com> <51933C0B.1060109@codesourcery.com> <519A64BD.8030104@redhat.com> In-Reply-To: <519A64BD.8030104@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00817.txt.bz2 On 05/21/2013 02:00 AM, Pedro Alves wrote: > The issue was actually with: > > if (end > 0) > { > struct thread_info *tp = find_thread_ptid (ptid); > > /* GDB should not send range stepping for all threads of > a process, like 'vCont;rSTART,END:pPID.-1', TP can't > be NULL. */ > gdb_assert (tp != NULL); > > I think it's best not to error on this as nothing in the protocol actually > prohibits it, and we might take advantage of it at some point. The way OK, looks I abused gdb_assert some times, :). > gdbserver handles vCont requests currently is by letting the target > match the ptid to whatever thread/lwp. That means leaving server.c > only knowing about how to parse the rsp and construct a thread_resume, > and then pass that down to the target. Conceivably, a target might > not need to keep the step range anywhere, if it has something like > a PTRACE_STEP_RANGE at the kernel level. (There's PTRACE_BLOCKSTEP, > but it's not the same). Yeah, that makes sense to me. I didn't realize such abstraction when reading the code. Thanks for your explanation. -- Yao (齐尧)