From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29123 invoked by alias); 8 Oct 2003 19:37:17 -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 29100 invoked from network); 8 Oct 2003 19:37:16 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 8 Oct 2003 19:37:16 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 131E62B89; Wed, 8 Oct 2003 15:37:10 -0400 (EDT) Message-ID: <3F846765.6070403@redhat.com> Date: Wed, 08 Oct 2003 19:37:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy , Andrew Batchelor Cc: gdb@sources.redhat.com, Sachin Bharadwaj Subject: Re: GDB --> Parallel Port --> Target?? References: <1065520908.1048.276.camel@And.Linux> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00143.txt.bz2 [adding Sachin] > Andrew Batchelor writes: > > >> Hello, >> >> I was wondering how straightforward it would be to write an extension >> for GDB to use the parallel port to connect to a target instead of the >> serial port? (Changing only a few files? Many files? Which ones?, >> etc.) >> >> Now I'm not really very familiar with GDB and before I jump in at the >> deep end, I was wondering if any of you guys could give me any pointers? >> At the moment I'm just having a read through the User Manual and the >> Internals Manual and looking at some of the C files that look like they >> might be of some help - can any of you guys point me in the right >> direction? >> >> Any help or advice you could offer would be much appreciated. > > > Have you tried simply doing "target remote /dev/lpt"? It's worth a > shot. FYI, it should just work. For GDB, there should really be no difference between a serial and parallel character interface. > If it turns out that doesn't work because the parallel device needs > special handling, that can be done pretty easily. > Someone asked about this regarding USB recently: > > http://sources.redhat.com/ml/insight/2003-q4/msg00016.html The correct kernel driver will let GDB talk though to the USB connected device as if it was a normal serial device. Of course, if it's the actual USB chip that your trying to communicate with, things can get a bit messy. While having the USB chip include a pseudo-serial interface that talked remote-protocol would work, I've seen implementations that ended up having a debug agent translate remote protocol into USB primatives. Andrew