From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24201 invoked by alias); 11 Mar 2002 15:53:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24086 invoked from network); 11 Mar 2002 15:53:48 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 11 Mar 2002 15:53:48 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 09AE13E0D; Mon, 11 Mar 2002 10:53:47 -0500 (EST) Message-ID: <3C8CD30A.8070207@cygnus.com> Date: Mon, 11 Mar 2002 07:53:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] remote debugging patches References: <3C8BA71F.20807@suse.cz> <3C8BBEFC.5040504@cygnus.com> <3C8CC863.8030206@suse.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00159.txt.bz2 > Andrew Cagney wrote: > Yes fine, er almost. Can you change the name of this to ``DONT_WAIT_FOREVER_FLAG'' and suggest making it an enum. (so GDB can print it :-) > > Why DONT_WAIT_FOREWER? IMHO wait_forewer is correct, because 0 means don't wait forewer (the default) and 1 means yes, wait forever. But you defined: > +#define WAIT_FOREVER_FLAG 0 Anyway, I think I misunderstood the reason for the change: > The first one is pretty straightforward and just makes use of the last parameter to getpkt(). As far as I can tell, you've just replaced the last parameter of getpkt() with a hardwired value - initially a macro but now an enum. Is that the intent? When I wrote: > If you're feeling really inspired (...), you could even introduce an enum to handle both the DO and DONT cases. I was thinking of something more like: enum { do_wait_forever, dont_wait_forever } wait_forever_flag; int getpkt (..., enum wait_forever_flag forever, ...) { if (forever == do_wait_forever) ... else ... et.al. } { getpkt (blah, dont_wait_forever); } Andrew