From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3291 invoked by alias); 26 Nov 2003 14:15:39 -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 3284 invoked from network); 26 Nov 2003 14:15:38 -0000 Received: from unknown (HELO ben.lut.ac.uk) (158.125.1.103) by sources.redhat.com with SMTP; 26 Nov 2003 14:15:38 -0000 Received: from [213.107.116.221] (helo=And.Linux) by ben.lut.ac.uk with esmtp (Exim 4.24) id 1AP0S7-0003Vl-Oe for gdb@sources.redhat.com; Wed, 26 Nov 2003 14:15:37 +0000 Subject: Adding-new-target difficulties From: Andrew Batchelor To: GDB Newsgroup Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 26 Nov 2003 14:15:00 -0000 Message-Id: <1069856145.1130.292.camel@And.Linux> Mime-Version: 1.0 X-Scan-Signature: 1885d6b4ec7b62b9c6f9448f8871be13 X-Spam-Score: -2.0 (--) X-Lboro-Filtered: ben.lut.ac.uk, Wed, 26 Nov 2003 14:15:38 +0000 X-SW-Source: 2003-11/txt/msg00254.txt.bz2 Hello, [Note: I'm adding support for ARMs RealView ICE to GDB] I'm trying to add a new target to GDB, but I'm not sure whether following the procedure in the user guide is going to give me what I want. Is there a more straightforward way? I need a new target which allows me to communicate via tcp/ip but allows me to change the Remote Serial Protocol to RV-MSG (RealView Protocol). The different protocol affects everything device; connect/disconnection, code loading, breakpoints, etc. I've been receiving information by others which has been really helpful. I've looked at BDMs example interface for Coldfire and am trying to work out what they've actually done - which I'm not finding too easy as it all seems to be in a single patch file. I'd appreciate any advice any of you guys might have..... I've played around with some bits, but I have a few things that I'm wondering about before I really start going at the code: If I follow GDBs guide to adding a new target, will I really get what I want? It seems to talk about things that I don't need - the only bit which will behave any differently is the protocol changing bit and that really only needs to sit on the end of wherever GDB spits stuff out. So..... Where exactly does GDB spit stuff out for a TCP/IP connection? I've been looking at remote.c and serial.c which seems to have functions related to it and another that looks promising is ser-tcp.c. Could I simply add a switch to the command 'target remote host?' Or add a case clause that detects if the hostname is 'RV-ICE' or something? I could perhaps then branch off to my code, calling GDB functions as and when? The integration aspect of GDB scares me a little, I'm not that hot at C and am struggling to follow through some of the hierarchy with my copy of 'Kernigham and Ritchie' by my side. :) Is BDM the only complete implementation of adding a new target to GDB? Does anyone know of any others, preferably with some (intuitive) details of the steps to follow? Thanks a lot for your help (and patience). Andy