From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11046 invoked by alias); 8 Oct 2003 13:44:36 -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 11039 invoked from network); 8 Oct 2003 13:44:33 -0000 Received: from unknown (HELO ben.lut.ac.uk) (158.125.1.103) by sources.redhat.com with SMTP; 8 Oct 2003 13:44:33 -0000 Received: from [213.107.116.221] (helo=And.Linux) by ben.lut.ac.uk with esmtp (Exim 4.14) id 1A7EcC-0004nY-SL; Wed, 08 Oct 2003 14:44:32 +0100 Subject: Re: GDB --> Parallel Port --> Target?? From: Andrew Batchelor To: Jim Blandy Cc: GDB Newsgroup In-Reply-To: References: <1065520908.1048.276.camel@And.Linux> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 08 Oct 2003 13:44:00 -0000 Message-Id: <1065620784.1045.330.camel@And.Linux> Mime-Version: 1.0 X-Spam-Score: -4.5 (----) X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *1A7EcC-0004nY-SL*D9jRDOclp/s* X-Lboro-Filtered: ben.lut.ac.uk, Wed, 08 Oct 2003 14:44:33 +0100 X-SW-Source: 2003-10/txt/msg00134.txt.bz2 On Tue, 2003-10-07 at 17:27, Jim Blandy wrote: > 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. Hi Jim, Thanks for your reply. > 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 Ah, that all looks more like what I'm after. > Oddly enough, it seems like someone was thinking about this at some > point. In serial.c: [.....] > But this is just parsing what comes after "target remote". So "target > remote lpt" would try to find a serial interface named "parallel". > But there is no code I could find that registered an interface by that > name, so the open would fail. Yeah, I couldn't find anything either. Looks like I need to have a stab at writing something myself: Can I check the flow of things? 1) Create new serial_ops structure pointing to initialise functions, etc. 2) Then call this serial_add_interface to register the new structure. 3) Add a new case to serial_open in serial.c for argument parsing to 'target remote'. I may need to do some protocol conversion from the Remote Serial Protocol to something else. Could you offer any advice on this? Andy