From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5690 invoked by alias); 2 Mar 2020 12:24:34 -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 5602 invoked by uid 89); 2 Mar 2020 12:24:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1385, HX-Received:a50 X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Mar 2020 12:24:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583151861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CfhOKXsxYuZB8rcaQcftGZe5mTEuvDsDQKz3TkKtRiU=; b=Gkl1lP1f08emS/mQacrC5n/geK/QT6px+Z7o8DKrOAJQ/iOH+iBT2haD4WxDz7uYpqvglN 5HdcvS7fy0VCvQfE2ROesUVn8Tk/WKk0xcYKmOCUKOZEtL52W78LVIgSl5d5vIQJNItRtO ujDn3rd7FM/lBGOTu3KltjDSDD/knbg= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-87-2QVgIg5IOcSCdK_yhnHhpA-1; Mon, 02 Mar 2020 07:24:17 -0500 Received: by mail-ed1-f72.google.com with SMTP id n12so7657718edq.13 for ; Mon, 02 Mar 2020 04:24:17 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f909:7b00:21e8:4cd6:8ec1:f387? ([2001:8a0:f909:7b00:21e8:4cd6:8ec1:f387]) by smtp.gmail.com with ESMTPSA id ga21sm780598ejb.72.2020.03.02.04.24.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2020 04:24:14 -0800 (PST) Subject: Re: [PATCHv3 1/2] gdbserver: Add mechanism to prevent sending T stop packets To: Andrew Burgess , gdb-patches@sourceware.org References: <27befec6c761c43f2e1a9e59403644c198cbd75b.1583149853.git.andrew.burgess@embecosm.com> From: Pedro Alves Message-ID: Date: Mon, 02 Mar 2020 12:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <27befec6c761c43f2e1a9e59403644c198cbd75b.1583149853.git.andrew.burgess@embecosm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-03/txt/msg00019.txt On 3/2/20 11:54 AM, Andrew Burgess wrote: > There is a developer only feature in gdbserver that provides a > command line option --disable-packet that prevents some packets from > being sent, which is used to increase test coverage within GDB. > > This commit extends this mechanism to prevent GDBserver from sending > the T stop reply packets, instead limiting GDBserver to only send the > S stop reply packets. > > The S stop reply packet is part of the older target control mechanism, > which has design flaws that were worked around with the introduction > of the newer target control mechanism, which uses the T stop reply > packet. > > Limiting GDBserver to use S stop packets instead of T stop packets > will, inevitably, mean that GDBserver doesn't function correctly in > many cases involving multiple threads, however, I don't think this is > too important, this is a developer only feature, intended to allow us > to test GDB. > > A new test that makes use of this feature will be added in the next > commit. > > gdbserver/ChangeLog: > > * remote-utils.cc (prepare_resume_reply): Add ability to convert T > reply into an S reply. > * server.cc (disable_packet_T): New global. > (captured_main): Set new global when appropriate. > * server.h (disable_packet_T): Declare. OK. Thanks, Pedro Alves