From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 839 invoked by alias); 3 Mar 2007 09:08:34 -0000 Received: (qmail 830 invoked by uid 22791); 3 Mar 2007 09:08:33 -0000 X-Spam-Check-By: sourceware.org Received: from elrond.portugalmail.pt (HELO elrond.portugalmail.pt) (195.245.179.181) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Mar 2007 09:08:28 +0000 Received: from localhost (localhost [127.0.0.1]) by elrond.portugalmail.pt (Postfix) with ESMTP id 94C7239891; Sat, 3 Mar 2007 09:08:20 +0000 (WET) Received: from elrond.portugalmail.pt ([127.0.0.1]) by localhost (elrond.portugalmail.pt [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EXCTanbAeTDu; Sat, 3 Mar 2007 09:08:20 +0000 (WET) Received: from [127.0.0.1] (62.169.106.230.rev.optimus.pt [62.169.106.230]) (Authenticated sender: pedro_alves@portugalmail.pt) by elrond.portugalmail.pt (Postfix) with ESMTP id 1F375398A9; Sat, 3 Mar 2007 09:08:04 +0000 (WET) Message-ID: <45E93AE5.5050704@portugalmail.pt> Date: Sat, 03 Mar 2007 09:08:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: Markus Deuling CC: GDB Patches Subject: Re: [Patch]: Little Cleanup References: <45E7CC17.5040304@de.ibm.com> In-Reply-To: <45E7CC17.5040304@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 000720-0, 01-03-2007), Outbound message X-Antivirus-Status: Clean 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: 2007-03/txt/msg00023.txt.bz2 Markus Deuling wrote: > @@ -2909,8 +2902,7 @@ > > if (!breakpoints_inserted && !ecs->another_trap) > { > - breakpoints_failed = insert_breakpoints (); > - if (breakpoints_failed) > + if (insert_breakpoints ()) > { > stop_stepping (ecs); > return; > > Actually, I find your version harder to read for someone not knowing the insert_breakpoints API by heart. To me, it looks like you are testing a function that returns a boolean. I read it as: "if insert_breakpoints succeeded". It looks like the de facto standard is to use: if (insert_breakpoints () != 0) The current version doesn't do it either, but 'breakpoints_failed' gives a pretty good hint. It may actually by a GNU coding convention, but I'm not sure. (Just being picky on a Saturday morning, ignore at will.) Cheers, Pedro Alves