This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] remote debugging patches
> 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.
It is called with both 0 and 1. The target_wait() and target_open() (?)
code waits forever when in synchronous mode.
> Who cares? In the debugger you'll see 'yes' or 'no' when you ask for the content of wait_forever_flag. Or do 'print /d wait_forever_flag' and you will se the decimal value.
If you found it necessary to change that parameter, then there is a good
chance that someone else will!
In the ``bad old days'' GDB was full of #ifdef DEBUG_SOMETHING_OBSCURE
code that ment re-compiling whenever you wanted to tweak something (the
ARI counts these). Such code should either be replaced with run-time
flags such as ``set debug ...'' or deleted.
In your case, check what Daniel wrote.
> enum {
> do_not_wait_forever = 0,
> wait_forever = 1
> };
See my post.
enjoy,
Andrew