From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28471 invoked by alias); 11 Mar 2002 16:34:58 -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 28424 invoked from network); 11 Mar 2002 16:34:54 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 11 Mar 2002 16:34:54 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 703FE3E0D; Mon, 11 Mar 2002 11:34:53 -0500 (EST) Message-ID: <3C8CDCAD.50205@cygnus.com> Date: Mon, 11 Mar 2002 08:34: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: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [RFA] remote debugging patches References: <3C8BA71F.20807@suse.cz> <3C8BBEFC.5040504@cygnus.com> <3C8CC863.8030206@suse.cz> <20020311103650.A9182@nevyn.them.org> <3C8CD61B.8070704@suse.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00162.txt.bz2 > 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