This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] remote debugging patches
On Mon, Mar 11, 2002 at 04:08:19PM +0100, Michal Ludvig wrote:
> 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 had #define WAIT_FOREVER_FLAG 0.
> >If you're feeling really inspired (...), you could even introduce an
> >enum to handle both the DO and DONT cases.
>
> OK, I changed it to enum called wait_forever_flag with values yes and
> no. Now it should be clear enough whether to wait or not. :-)
- "no" and "yes" are useless values for a flag; they don't indicate any
meaning.
- You made wait_forever_flag a variable that was never changed, and
replaced a constant 0 with it... no point.
I think what Andrew had in mind was more like
enum {
do_not_wait_forever = 0,
wait_forever = 1
};
and change calls to
getpkt (blah, do_not_wait_forever)
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer