This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fwd: [PATCH] fix Bug 11568 - delete thread-specific breakpoint on the thread exit
- From: Waqas Jamil <waqas dot jamil47 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 23 Jul 2013 13:55:32 +0500
- Subject: Fwd: [PATCH] fix Bug 11568 - delete thread-specific breakpoint on the thread exit
- References: <CADLiu3NUV2PSTJ2uKcPMAq_WiYH5NaiqHB9hWRgATVLPBu4zmw at mail dot gmail dot com> <51ED0493 dot 3090404 at codesourcery dot com> <CADLiu3OrxQLRmw9oAZ0u17giV9MfDtuCZmkf=9TB=oNBRiFsBw at mail dot gmail dot com>
Now is it ok?
2013-07-22 Muhammad Waqas <waqas.jamil47@gmail.com>
* breakpoint.c (breakpoint_auto_delete): remove breakpoints
remove thread specified breakpoints
--- mygdb/gdb-7.6/gdb/breakpoint.c 2013-07-23 08:30:56.231681932 +0500
+++ /home/waqas/Downloads/gdb/gdb-7.6/gdb/breakpoint.c 2013-04-25
13:15:34.000000000 +0500
@@ -12099,12 +12099,6 @@ 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) ;
- if (tp != NULL && (tp->state == THREAD_EXITED ||
!target_thread_alive (tp->ptid)))
- delete_breakpoint (b);
- }
}
On Mon, Jul 22, 2013 at 3:08 PM, ali_anwar <ali_anwar@codesourcery.com> wrote:
> 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
--
Regards :
Muhammad Waqas
--
Regards :
Muhammad Waqas