This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: [PATCH] fix Bug 11568 - delete thread-specific breakpoint on the thread exit


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]