From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28375 invoked by alias); 15 Sep 2016 15:08:48 -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 28362 invoked by uid 89); 15 Sep 2016 15:08:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1093, arnezlinuxvnetibmcom, arnez@linux.vnet.ibm.com, Hx-spam-relays-external:209.85.213.66 X-HELO: mail-vk0-f66.google.com Received: from mail-vk0-f66.google.com (HELO mail-vk0-f66.google.com) (209.85.213.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Sep 2016 15:08:45 +0000 Received: by mail-vk0-f66.google.com with SMTP id m62so1358282vkd.2 for ; Thu, 15 Sep 2016 08:08:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=REjwDut55EQcbW6SDwaMpt+XoT6UzDMJuHHpnO9yGNo=; b=XC0TleBxYg98HfhEek0n+nehGGTACxsSrb2vDqYr8Fj6V6P+4CgrU/eavbU/ecSV0V lMH+bhaXDOSTzuBN1daCoMbPstaddq7Ze5WYlj/1jHtNlX/kILdj83RYFLuhCVb+dWvp ka9q/YATnT7c17rJkQw2MCJ3sXf08IOcOzjT+cePqEpNk7AG/fTeHTZ7Z8KRjLzWkkl5 /Kc3Tk1G6iL94NDYuoiFDav3uxG1P7BOrBHeabMOAspiuSGQBv3tR1lQQn/zcE5NofRK Prge/sj44RLt17aLtIiRx523tzYBbQK1st/XmEioTiaOLWk+LLe17dmGsRqGDVHBE9dP VTJw== X-Gm-Message-State: AE9vXwMolXYsQR9U0Tpo+Fj1qT4H/YkKQJSA2YHS8RB2hogjtM+0hPLK8H3UdEoHAWap1VGliQTai+DhNrI+Mg== X-Received: by 10.31.164.76 with SMTP id n73mr3681285vke.103.1473952123735; Thu, 15 Sep 2016 08:08:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.134.146 with HTTP; Thu, 15 Sep 2016 08:08:43 -0700 (PDT) In-Reply-To: <1473940907-4449-4-git-send-email-arnez@linux.vnet.ibm.com> References: <1473940399-2891-1-git-send-email-arnez@linux.vnet.ibm.com> <1473940907-4449-4-git-send-email-arnez@linux.vnet.ibm.com> From: Yao Qi Date: Thu, 15 Sep 2016 15:08:00 -0000 Message-ID: Subject: Re: [PATCH 5/6] linux-nat: Add function lwp_is_stepping To: Andreas Arnez Cc: "gdb-patches@sourceware.org" , Ulrich Weigand Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00157.txt.bz2 Hi Andreas, Patch is good to me. One nit below ... On Thu, Sep 15, 2016 at 1:01 PM, Andreas Arnez w= rote: > Add the function lwp_is_stepping which indicates whether the given LWP > is currently single-stepping. This is a common interface, usable from > native GDB as well as from gdbserver. "single-stepping" in hardware or software? I know it is hardware single step. > > +/* Return nonzero if we are single-stepping this LWP. */ > + > +extern int lwp_is_stepping (struct lwp_info *lwp); > + > #endif /* LINUX_NAT_H */ in gdbserver, struct lwp_info { .... /* If this flag is set, the last continue operation at the ptrace level on this process was a single-step. */ int stepping; in gdb, struct lwp_info { ... /* Non-zero if we were stepping this LWP. */ int step; Looks the comments in gdbservers is better than the comments in gdb. lwp_is_stepping, as an api, should be documented clearly. Something like, /* Return nonzero if we are single-stepping this LWP at the ptrace level. */ --=20 Yao (=E9=BD=90=E5=B0=A7)