From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4980 invoked by alias); 20 May 2013 18:01:08 -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 4971 invoked by uid 89); 20 May 2013 18:01:08 -0000 X-Spam-SWARE-Status: No, score=-8.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 20 May 2013 18:01:07 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4KI15hb020565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 May 2013 14:01:05 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4KI14JV006597; Mon, 20 May 2013 14:01:04 -0400 Message-ID: <519A64E0.3030806@redhat.com> Date: Mon, 20 May 2013 18:01:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 4/5] range stepping: gdbserver (x86 GNU/Linux) References: <20130514191026.13213.39574.stgit@brno.lan> <20130514191054.13213.58686.stgit@brno.lan> <51937BE9.7070802@codesourcery.com> In-Reply-To: <51937BE9.7070802@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00738.txt.bz2 On 05/15/2013 01:13 PM, Yao Qi wrote: > On 05/15/2013 03:10 AM, Pedro Alves wrote: >> - Moved step range bits out of gdbthread.h/inferiors.c into linux-low.c. > > Pedro, > What is your reason to do this move? because the range stepping is only implemented on Linux? I chose to add in generic code because I thought range stepping can be implemented for other targets. Yes, kind of. At first, I saw that the v1/v2 implementation didn't allow wildcard ptids, and I thought that it'd be best not to error on it, as nothing in the protocol actually prohibits it. The way gdbserver handles vCont requests currently is by letting the target match the ptid to whatever thread/lwp. In the case of Linux, that's in linux_set_resume_request. After putting the range in struct thread_resume, and making linux_set_resume_request always copy it, as in: thread->step_range_start = lwp->resume->step_range_start; thread->step_range_end = lwp->resume->step_range_end; I noticed that nothing outside of linux-low.c actually called thread_clear_range_stepping, so I removed that. Then, I noticed that thread_in_range_stepping_p was never used outside linux-low.c (and won't unless gdbserver's backends are made to always do non-stop instead of pausing all threads itself, along with all the step-over-breakpoint complication). So in the end, seeing how all was always in the target, I just went with leaving the fields Linux specific, rather than leave the fields dangling on other targets, thinking it'd be easy enough to reconsider once other targets implement range stepping. Meanwhile, other targets wouldn't pay for extra fields they don't use. -- Pedro Alves