From patchwork Thu May 21 23:19:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 6866 Received: (qmail 64870 invoked by alias); 21 May 2015 23:19:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 64803 invoked by uid 89); 21 May 2015 23:19:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 May 2015 23:19:25 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5BE70BDD84 for ; Thu, 21 May 2015 23:19:24 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4LNJEJ6027592 for ; Thu, 21 May 2015 19:19:23 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 08/18] Add comments to currently_stepping and target_resume Date: Fri, 22 May 2015 00:19:04 +0100 Message-Id: <1432250354-2721-9-git-send-email-palves@redhat.com> In-Reply-To: <1432250354-2721-1-git-send-email-palves@redhat.com> References: <1432250354-2721-1-git-send-email-palves@redhat.com> Clarify that currently_stepping works at a higher level than target_resume. gdb/ChangeLog: 2015-05-21 Pedro Alves * infrun.c (currently_stepping): Extend intro comment. * target.h (target_resume): Extend intro comment. This is a new patch in v4. --- gdb/infrun.c | 4 +++- gdb/target.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 55a6622..9f668a3 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5848,7 +5848,9 @@ switch_back_to_stepped_thread (struct execution_control_state *ecs) return 0; } -/* Is thread TP in the middle of single-stepping? */ +/* Is thread TP in the middle of (software or hardware) + single-stepping? (Note the result of this function must never be + passed directly as target_resume's STEP parameter.) */ static int currently_stepping (struct thread_info *tp) diff --git a/gdb/target.h b/gdb/target.h index 3a0ae7b..d398747 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1254,8 +1254,8 @@ extern void target_detach (const char *, int); extern void target_disconnect (const char *, int); /* Resume execution of the target process PTID (or a group of - threads). STEP says whether to single-step or to run free; SIGGNAL - is the signal to be given to the target, or GDB_SIGNAL_0 for no + threads). STEP says whether to hardware single-step or to run free; + SIGGNAL is the signal to be given to the target, or GDB_SIGNAL_0 for no signal. The caller may not pass GDB_SIGNAL_DEFAULT. A specific PTID means `step/resume only this process id'. A wildcard PTID (all threads, or all threads of process) means `step/resume