From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3031 invoked by alias); 4 Mar 2011 18:58:41 -0000 Received: (qmail 3021 invoked by uid 22791); 4 Mar 2011 18:58:40 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 18:58:36 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id F14D25400D; Fri, 4 Mar 2011 10:58:34 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id E9E05CD94C; Fri, 4 Mar 2011 10:58:34 -0800 (PST) Message-ID: <4D71365A.4040404@vmware.com> Date: Fri, 04 Mar 2011 18:58:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Tom Tromey CC: Joel Brobecker , "gdb-patches@sourceware.org" Subject: Re: [RFA] breakpoint.c, create_breakpoint, document that the case statement falls through. References: <4D6EE3D9.2040108@vmware.com> <20110303042652.GU30306@adacore.com> <4D6FCBB1.9040507@vmware.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020200000006010707040504" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00310.txt.bz2 This is a multi-part message in MIME format. --------------020200000006010707040504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 513 Tom Tromey wrote: >>>>>> "Michael" == Michael Snyder writes: > > Michael> No, honest, it *does* fall through! > Michael> I had to use a printf statement to convince myself. ;-) > Michael> When the user answers "yes" to the query, it falls through. > > Yeah. Your patch is correct, or at least correct-enough. > Adding a "break" would also be correct, because sals.nelts is never 0 at > the end of this case. > > Tom OK then, I'd rather break than fall through. Committed as attached. --------------020200000006010707040504 Content-Type: text/plain; name="break10.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="break10.txt" Content-length: 570 2011-03-04 Michael Snyder * breakpoint.c (create_breakpoint): Add missing break statement. Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.546 diff -u -p -u -p -r1.546 breakpoint.c --- breakpoint.c 1 Mar 2011 02:16:56 -0000 1.546 +++ breakpoint.c 4 Mar 2011 18:57:27 -0000 @@ -7843,6 +7843,7 @@ create_breakpoint (struct gdbarch *gdbar default: throw_exception (e); } + break; default: if (!sals.nelts) return 0; --------------020200000006010707040504--