This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] remote debugging patches
> 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