From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8398 invoked by alias); 7 Sep 2011 01:29:42 -0000 Received: (qmail 8390 invoked by uid 22791); 7 Sep 2011 01:29:41 -0000 X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_00,BOTNET,FROM_12LTRDOM,RDNS_NONE X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Sep 2011 01:29:27 +0000 Received: (qmail 20579 invoked from network); 7 Sep 2011 01:29:26 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Sep 2011 01:29:26 -0000 Message-ID: <4E66C8ED.5070902@codesourcery.com> Date: Wed, 07 Sep 2011 02:35:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Add comments on step_after_step_resume_breakpoint Content-Type: multipart/mixed; boundary="------------030705000704090102030509" X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00102.txt.bz2 This is a multi-part message in MIME format. --------------030705000704090102030509 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-length: 513 When I am reading struct thread_info, I find the comment on step_after_step_resume_breakpoint is not helpful to me to understand it, until I read the original patch here http://cygwin.com/ml/gdb-patches/2004-08/msg00743.html The explanation of the patch was very clear, but it is missing in the comment of code. This patch is to copy some of words in original patch post to the comment on field `step_after_step_resume_breakpoint', in order to make comment self-explained. OK to apply? -- Yao (齐尧) --------------030705000704090102030509 Content-Type: text/x-patch; name="0002-comment-on-step_after_step_resume_breakpoint.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-comment-on-step_after_step_resume_breakpoint.patch" Content-length: 1196 gdb/ gdbthread.h (struct thread_info): Comment on field `step_after_step_resume_breakpoint'. --- gdb/gdbthread.h | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 0b19a8d..6baeb92 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -176,7 +176,14 @@ struct thread_info int stepping_over_breakpoint; /* Set to TRUE if we should finish single-stepping over a breakpoint - after hitting the current step-resume breakpoint. */ + after hitting the current step-resume breakpoint. The context here + is that GDB is to do `next' or `step' while signal arrives. + When stepping over a breakpoint and signal arrives, GDB will attempt + to skip signal handler, so it inserts a step_resume_breakpoint at the + signal return address, and resume inferior. + step_after_step_resume_breakpoint is set to TRUE at this moment in + order to keep GDB in mind that there is still a breakpoint to step over + when GDB gets back SIGTRAP from step_resume_breakpoint. */ int step_after_step_resume_breakpoint; /* This is set TRUE when a catchpoint of a shared library event -- 1.7.0.4 --------------030705000704090102030509--