This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] fix Bug 11568 - delete thread-specific breakpoint on the thread exit
- From: ali_anwar <ali_anwar at codesourcery dot com>
- To: Waqas Jamil <waqas dot jamil47 at gmail dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 22 Jul 2013 15:08:19 +0500
- Subject: Re: [PATCH] fix Bug 11568 - delete thread-specific breakpoint on the thread exit
- References: <CADLiu3NUV2PSTJ2uKcPMAq_WiYH5NaiqHB9hWRgATVLPBu4zmw at mail dot gmail dot com>
On 07/22/2013 01:55 PM, Waqas Jamil wrote:
After Changing in breakpoint.c:breakpoint_auto_delete
Please find below a review on the style without any comments on the
actual code.
Needs a Chnagelog.
--- gdb/breakpoint.c 2013-04-25 13:15:34.000000000 +0500
+++ ./breakpoint.c 2013-07-22 11:53:43.156686242 +0500
@@ -12099,6 +12099,14 @@ breakpoint_auto_delete (bpstat bs)
{
if (b->disposition == disp_del_at_next_stop)
delete_breakpoint (b);
+ else if ( b->thread > 0 ) /* If breakpoint relates to user created
thread Check if it's not alive then delete it*/
+ {
+ struct thread_info * tp= find_thread_id (b->thread) ;
Please add a space before '='.
+ if ( tp != NULL && ( tp->state == THREAD_EXITED ||
!target_thread_alive (tp->ptid) ) )
Remove extra spaces, after 'if (' and from the end between ') ) )'.
+ {
+ delete_breakpoint (b);
Indentation is not correct.
+ }
+ }
}
}
Thanks,
-Ali