Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: Daniel Jacobowitz <drow@false.org>, GDB <gdb-patches@sourceware.org>
Subject: Re: Patch: Little improvement to delete breakpoint command
Date: Tue, 28 Nov 2006 17:53:00 -0000	[thread overview]
Message-ID: <456C7791.6070807@de.ibm.com> (raw)
In-Reply-To: <20061128174246.GA23830@nevyn.them.org>

Hello,

Daniel Jacobowitz schrieb:
> On Tue, Nov 28, 2006 at 06:35:12PM +0100, Markus Deuling wrote:
>> I did test it and it works for me.
> 
> Did you run the testsuite?  Or experiment with any case that should set
> breaks_to_delete but not for the most recent breakpoint?
> 
>> The braces are included in vanilla gdb-6.5. Without that "break" the 
>> braces are unnecessary. This is the original routine:
>>
>>       ALL_BREAKPOINTS (b)
>>       {
>>         if (b->type != bp_call_dummy &&
>>             b->type != bp_shlib_event &&
>>             b->type != bp_thread_event &&
>>             b->type != bp_overlay_event &&
>>             b->number >= 0)
>>           breaks_to_delete = 1;
>>       }
> 
> Wrong braces.  You've converted that to:
> 
>        ALL_BREAKPOINTS (b)
>        {
>          if (b->type != bp_call_dummy &&
>              b->type != bp_shlib_event &&
>              b->type != bp_thread_event &&
>              b->type != bp_overlay_event &&
>              b->number >= 0)
>            breaks_to_delete = 1;
>            break;
>        }
> 
> Now do you see the problem?  Remember, C is not whitespace sensitive.
> 

You are right, sorry, silly mistake from me :-(
This should work:

--- breakpoint.old      2006-11-28 18:47:43.000000000 +0100
+++ breakpoint.c        2006-11-28 18:50:58.000000000 +0100
@@ -6959,7 +6959,10 @@
             b->type != bp_thread_event &&
             b->type != bp_overlay_event &&
             b->number >= 0)
-         breaks_to_delete = 1;
+         {
+           breaks_to_delete = 1;
+           break;
+         }
        }

        /* Ask user only if there are some breakpoints to delete.  */



Regards,
Markus

-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com


  reply	other threads:[~2006-11-28 17:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 17:22 Markus Deuling
2006-11-28 17:25 ` Daniel Jacobowitz
2006-11-28 17:35   ` Markus Deuling
2006-11-28 17:42     ` Daniel Jacobowitz
2006-11-28 17:53       ` Markus Deuling [this message]
2006-11-29 13:52 Markus Deuling
2007-01-21 17:43 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=456C7791.6070807@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox