From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7937 invoked by alias); 29 Jul 2009 18:50:43 -0000 Received: (qmail 7928 invoked by uid 22791); 29 Jul 2009 18:50:42 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jul 2009 18:50:34 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n6TIoXXv006988 for ; Wed, 29 Jul 2009 14:50:33 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6TIoW7M008510 for ; Wed, 29 Jul 2009 14:50:32 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6TIoVcj029393; Wed, 29 Jul 2009 14:50:31 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id E0FFB5081C4; Wed, 29 Jul 2009 12:50:30 -0600 (MDT) To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Implement -break-commands References: <200907271303.13335.vladimir@codesourcery.com> <200907272050.41744.vladimir@codesourcery.com> From: Tom Tromey Reply-To: Tom Tromey Date: Wed, 29 Jul 2009 21:08:00 -0000 In-Reply-To: <200907272050.41744.vladimir@codesourcery.com> (Vladimir Prus's message of "Mon\, 27 Jul 2009 20\:50\:40 +0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-07/txt/msg00717.txt.bz2 Tom> There's some other little style nits in the patch -- over-bracing Tom> in the second patch, mostly. Volodya> Is that something you want fixed? I do prefer bracing Volodya> everything, since that is safer in the long run. Yes, please fix this. AFAIK this is the documented style. Volodya> +void Volodya> +breakpoint_set_commands (struct breakpoint *b, struct command_line *commands) Tom> Needs a header comment. Volodya> Do we have a policy if function should be documented in header, Volodya> or implementation? It seems many existing files have comments Volodya> on implementation. It is hard to say whether we arrived at a policy the last time we had this discussion. These things rarely seem to converge, they just wander off into the weeds. I usually follow the prevailing style of the module I am modifying. That is always a safe thing to do. Tom> I think this would be cleaner if read_command_lines_1 took a "user_data" Tom> argument and then there were no new globals. Volodya> It would be clearer, though I decided not to do that because Volodya> it's not likely we'll need another such function, and the use Volodya> of globals in this context is ugly, but safe. Shall I refactor? This one is up to you :-) Tom