From: Daniel Jacobowitz <drow@mvista.com>
To: Michal Ludvig <mludvig@suse.cz>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] remote debugging patches
Date: Mon, 11 Mar 2002 08:12:00 -0000 [thread overview]
Message-ID: <20020311111225.A11174@nevyn.them.org> (raw)
In-Reply-To: <3C8CD61B.8070704@suse.cz>
On Mon, Mar 11, 2002 at 05:06:51PM +0100, Michal Ludvig wrote:
> Daniel Jacobowitz wrote:
> >But you had #define WAIT_FOREVER_FLAG 0.
>
> During the weekend I was debugging problems in communication between
> gdb(i386) and gdbserver(x8664). Whenever I was stepping through
> gdbserver, the other side timeouted. I've found, that last argument to
> getpkt() is called 'forever', but in all calls was set to '0'. I didn't
> want these timeouts, so I changed all occurences of 0 to
> WAIT_FOREVER_FLAG, which could be set in compile-time. Most users and
> developpers (unless they will work on remote.c or alike) will leave this
> unchanged to 0, but sometimes it may be handy to set to 1 and recompile.
> >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)
>
> I don't understand the point of this :-( Then I'd have to change all
> occurences of do_not_wait_forever to wait_forever in the whole file to
> change the behaviour? Isn't it much easier to change just one line on
> top of the file from 'no' to 'yes' instead?
Ah! This is why you should say clearly what you're trying to
accomplish instead of just posting a patch :)
The right thing to do here is more like:
- Create the enum, as Andrew or I described it
- Create the global variable, with a name that does not suggest its
value, only its meaning. Something like ``getpkt_default_timeout_flag''.
- Change all appropriate calls to use the variable.
- Add ``set remote wait-forever on/off'' to update the variable.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-03-11 16:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-10 10:34 Michal Ludvig
2002-03-10 11:35 ` Daniel Jacobowitz
2002-03-10 11:43 ` Michal Ludvig
2002-03-10 14:30 ` Daniel Jacobowitz
2002-03-11 6:54 ` Michal Ludvig
2002-03-11 7:37 ` Daniel Jacobowitz
2002-03-11 18:22 ` Andrew Cagney
2002-03-11 18:47 ` Daniel Jacobowitz
2002-03-13 6:14 ` Michal Ludvig
2002-03-13 7:48 ` Andreas Schwab
2002-03-13 8:17 ` Michal Ludvig
2002-03-13 8:34 ` Andrew Cagney
2002-03-13 9:53 ` Andreas Schwab
2002-03-13 11:09 ` Michal Ludvig
2002-03-13 12:24 ` Andreas Schwab
2002-03-13 9:07 ` Daniel Jacobowitz
2002-03-10 12:16 ` Andrew Cagney
2002-03-11 7:08 ` Michal Ludvig
2002-03-11 7:37 ` Daniel Jacobowitz
2002-03-11 8:06 ` Michal Ludvig
2002-03-11 8:12 ` Daniel Jacobowitz [this message]
2002-03-11 8:38 ` Michal Ludvig
2002-03-11 8:34 ` Andrew Cagney
2002-03-11 7:53 ` Andrew Cagney
2002-03-11 9:12 ` Michal Ludvig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020311111225.A11174@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mludvig@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox