From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30728 invoked by alias); 11 Nov 2010 15:51:56 -0000 Received: (qmail 30522 invoked by uid 22791); 11 Nov 2010 15:51:55 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: sourceware.org Received: from smarthost.idnet.net (HELO smarthost.idnet.net) (212.69.40.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Nov 2010 15:51:47 +0000 Received: from localhost (unknown [127.0.0.1]) by smarthost.idnet.net (Postfix) with ESMTP id 756989F925 for ; Thu, 11 Nov 2010 15:51:42 +0000 (UTC) Received: from smarthost.idnet.net ([127.0.0.1]) by localhost (smarthost.idnet.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ow26JhzyB7Vt for ; Thu, 11 Nov 2010 15:51:40 +0000 (GMT) Received: from smarthost.idnet.net (template [127.0.0.1]) by smarthost.idnet.net (Postfix) with ESMTP id 531709F926 for ; Thu, 11 Nov 2010 15:51:40 +0000 (GMT) Received: from mail.idnet.net.uk (mail.idnet.net.uk [212.69.36.63]) by smarthost.idnet.net (Postfix) with ESMTP id 348BD9F911 for ; Thu, 11 Nov 2010 15:51:40 +0000 (GMT) Received: from [91.135.5.64] by mail.idnet.net.uk (GMS 15.02.3689/NU3963.00.7ca42f0c) with ESMTP id kqbkgoca for gdb@sourceware.org; Thu, 11 Nov 2010 15:51:36 +0000 Subject: Re: Fwd: Porting GDB to new architecture From: Jeremy Bennett Reply-To: jeremy.bennett@embecosm.com To: gdb@sourceware.org Cc: Dalibor Kovacevic In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 11 Nov 2010 15:51:00 -0000 Message-ID: <1289490700.3105.193.camel@thomas> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthenticatedSender: jeremy.bennett.embecosm.com@idnet.net.uk X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00052.txt.bz2 On Thu, 2010-11-11 at 15:43 +0100, Dalibor Kovacevic wrote: > I'm porting gdb 7.2 to a new architecture and I need a few tips to get > me started. I have read all about porting gdb that google search found > on that subject. The HOW TO from Jeremy Bennett helped me allot to > understand what I need to do. But before the start of porting I was > wondering could someone help me choose the starting template from > already ported architectures. Mine is a combination of DSP > and a microcontroller, binutils are already ported so i have BFD, it > will be debugged via stub. Hi Dalibor, Glad you found the HOWTO useful. I need to update it for GDB 7.x. In particular the frame handling has changed, so the functions use THIS frame as the handle, rather than the NEXT frame. The function names have changed accordingly. I took my examples from the OpenRISC 1000, which is a MIPS like RISC architecture. It's not part of the official GDB distribution (yet!), but you can find the source code at http://opencores.org/openrisc,gnu_toolchain Because I used it in the HOWTO, the code is commented rather more verbosely than other ports, so you may find it a useful example to look at. There is a 7.2 version, which will help you with the new function names. HTH, Jeremy -- Tel: +44 (1590) 610184 Cell: +44 (7970) 676050 SkypeID: jeremybennett Email: jeremy.bennett@embecosm.com Web: www.embecosm.com