From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21491 invoked by alias); 26 Jan 2005 10:47:58 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21306 invoked from network); 26 Jan 2005 10:47:34 -0000 Received: from unknown (HELO calvin.codito.co.in) (220.225.32.98) by sourceware.org with SMTP; 26 Jan 2005 10:47:34 -0000 Received: from [192.168.100.52] (arnor.codito.co.in [192.168.100.52]) by calvin.codito.co.in (8.12.10/8.12.10) with ESMTP id j0QAlEpU031499; Wed, 26 Jan 2005 16:17:15 +0530 Message-ID: <41F77519.2040808@codito.com> Date: Wed, 26 Jan 2005 10:47:00 -0000 From: Ramana Radhakrishnan User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) MIME-Version: 1.0 To: Min ZOU CC: gdb@sources.redhat.com Subject: Re: serial port conflicts References: <41F7611C.9010009@renesas.com> In-Reply-To: <41F7611C.9010009@renesas.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00127.txt.bz2 Hi, > Hi, > > I have implemented a gdb stub for a SH2 target based on "sh-stub.c" from > GDB-v3.6 source. Now some basic features like step, break, cont, memory > read/write, etc. are tested successfully. > > The gdb stub and gdb on host communicate via remote serial protocol. > However I have a problem to debug an application program, which accesses > the same serial port used by gdb, e.g. I/O functions like "putstring()", > "getchar()", etc. In my case, "putstring()" cannot display any message > in gdb console, and "getchar()" cannot receive any input. 1. The IO activities would finally map down into a call to write / read / open etc. . Modify the write / read / open in your library to take care of the File IO extensions in the serial protocol if used with the GDB remote protocol. 2. Use 2 different serial ports (if you have them) . One for the console output and the other for the remote debugging. This might be simpler ;-) HTH cheers Ramana -- Ramana Radhakrishnan GNU Tools codito ergo sum (www.codito.com)