From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108766 invoked by alias); 6 May 2016 10:32:44 -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 108492 invoked by uid 89); 6 May 2016 10:32:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1618, claim X-HELO: mail-pf0-f169.google.com Received: from mail-pf0-f169.google.com (HELO mail-pf0-f169.google.com) (209.85.192.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 06 May 2016 10:32:34 +0000 Received: by mail-pf0-f169.google.com with SMTP id c189so50089738pfb.3 for ; Fri, 06 May 2016 03:32:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=jvnN+/Q2A7oMZKSQW60MTPp8Fkw5Jih4C1dXOsUeFOo=; b=TLtS5IzzYOos/19+jtrj40VVCYoLkTI1uDQPfKm1VIFWx1EaGXDPfiY/4Case/oSzc aTXLdqdD3rJdc4YxR+RtiBwO+Spou6rPTucrKh7YyWepOt1KtMNrfJFh31GXPQ9Unm6a Gp40mit+uNxhG3hZVtgBmi1rjhLcRchIGkpWjFEtsIK+Y6+0IKoEmuKzRzCsW98v5TLU oySCtPdO7kxfhubmutJqvbQubjL9JQ8J+sovym+oYXnNkbwqxFFR4LkVxqSz3GHu/cR+ S5Mmd6tioz9HB1vamUr/PKFGo/g5ZIL2fVr8yk/UJuKy25S1V1oGya2fnynH8RJ8kpdJ 0ikg== X-Gm-Message-State: AOPr4FUyFJKqTCEN4mOU8AEUHhg8fwVToLL81zN17jm/9ZL41ZBNzJvy0/RUF9RT07rOmQ== X-Received: by 10.98.34.72 with SMTP id i69mr27554634pfi.153.1462530752873; Fri, 06 May 2016 03:32:32 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id qm10sm20041121pac.33.2016.05.06.03.32.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 03:32:32 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 3/3] [GDBserver] Support vCont s and S actions with software single step Date: Fri, 06 May 2016 10:32:00 -0000 Message-Id: <1462530736-25117-4-git-send-email-yao.qi@linaro.org> In-Reply-To: <1462530736-25117-1-git-send-email-yao.qi@linaro.org> References: <1462530736-25117-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00087.txt.bz2 GDBserver with software single step should be able to claim supporting vCont s and S actions, so that GDB knows the remote target can do single step. It doesn't matter to GDB that the single step in the remote target is done via hardware or software. gdb/gdbserver: 2016-05-06 Yao Qi * server.c (handle_v_requests): Support s and S actions if target_supports_software_single_step return true. --- gdb/gdbserver/server.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 9c50929..03cbc7b 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2958,12 +2958,15 @@ handle_v_requests (char *own_buf, int packet_len, int *new_packet_len) { strcpy (own_buf, "vCont;c;C;t"); - if (target_supports_hardware_single_step () || !vCont_supported) + if (target_supports_hardware_single_step () + || target_supports_software_single_step () + || !vCont_supported) { - /* If target supports hardware single step, add actions s - and S to the list of supported actions. On the other - hand, if GDB doesn't request the supported vCont actions - in qSupported packet, add s and S to the list too. */ + /* If target supports single step either by hardware or by + software, add actions s and S to the list of supported + actions. On the other hand, if GDB doesn't request the + supported vCont actions in qSupported packet, add s and + S to the list too. */ own_buf = own_buf + strlen (own_buf); strcpy (own_buf, ";s;S"); } -- 1.9.1