Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Add comments on step_after_step_resume_breakpoint
@ 2011-09-07  2:35 Yao Qi
  2011-09-07  9:53 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2011-09-07  2:35 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

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 (齐尧)

[-- Attachment #2: 0002-comment-on-step_after_step_resume_breakpoint.patch --]
[-- Type: text/x-patch, Size: 1196 bytes --]

	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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Add comments on step_after_step_resume_breakpoint
  2011-09-07  2:35 Add comments on step_after_step_resume_breakpoint Yao Qi
@ 2011-09-07  9:53 ` Pedro Alves
  2011-09-07 13:58   ` [committed]; " Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2011-09-07  9:53 UTC (permalink / raw)
  To: gdb-patches; +Cc: Yao Qi

On Wednesday 07 September 2011 02:29:17, Yao Qi wrote:
> 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?

Okay.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [committed]; Add comments on step_after_step_resume_breakpoint
  2011-09-07  9:53 ` Pedro Alves
@ 2011-09-07 13:58   ` Yao Qi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2011-09-07 13:58 UTC (permalink / raw)
  To: gdb-patches

On 09/07/2011 05:45 PM, Pedro Alves wrote:
> On Wednesday 07 September 2011 02:29:17, Yao Qi wrote:
>> 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?
>
> Okay.
>
Thanks for this quick review.  Committed.
http://sourceware.org/ml/gdb-cvs/2011-09/msg00037.html

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-07 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-07  2:35 Add comments on step_after_step_resume_breakpoint Yao Qi
2011-09-07  9:53 ` Pedro Alves
2011-09-07 13:58   ` [committed]; " Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox