From owner-freebsd-ppc Sun Jul 28 1:19:46 2002 Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8291037B400 for ; Sun, 28 Jul 2002 01:19:44 -0700 (PDT) Received: from gt3.OntheNet.com.au (nt.com.au [203.13.70.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14A8C43E3B for ; Sun, 28 Jul 2002 01:19:42 -0700 (PDT) (envelope-from peterg@ptree32.com.au) Received: from ptree32.com.au (CPE-203-45-246-228.qld.bigpond.net.au [203.45.246.228]) by gt3.OntheNet.com.au (8.11.4/8.11.4) with ESMTP id g6S8NLb35653 for ; Sun, 28 Jul 2002 18:23:21 +1000 (EST) Message-ID: <3D43AD79.8891C503@ptree32.com.au> Date: Sun, 28 Jul 2002 18:38:17 +1000 From: Peter Grehan Organization: Ptree32 Pty Ltd X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.14-12 i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Subject: Re: gdb References: <1027732166.3d41f2c662b9e@www.wantpackets.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ppc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Andy, > Peter G, What is your take on the gdb "problem?" > The simulator uses its own I/O scheme, but gdb uses readline for pretty-bloat. > (Not to mention it actually is quite useful at times.) > I want to know what you think (or anybody with helpful experiece) should be done, > or rather, more precisely, how. When running in gdb, psim uses i/o calls from gdb/sim/common/callback.c, which are all pretty simple, and blocking :-( There's at least a few solutions: - add a 'set nonblocking t/f' call to the callback vector in callback.c, so the sim_io_read_stdin code could call this before and after the read call. - in sim/ppc/sim_calls.c:sim_io_read_stdin(), if DONT_USE_STDIO is defined, copy the code from sim/ppc/main.c for that same block of code. - in sim/ppc/hw_pal.c, allow a filename to be specified for the tty read/write registers in the tree config file. This could default to be the sim_io_{read/write} calls, but could allow some interesting uses, such as a slave pty to allow sim i/o to occur in another terminal window. later, Peter. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ppc" in the body of the message