From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30399 invoked by alias); 14 May 2009 14:37:21 -0000 Received: (qmail 30381 invoked by uid 22791); 14 May 2009 14:37:20 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp.idnet.com (HELO smtp-out.idnet.com) (212.69.36.238) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 May 2009 14:37:14 +0000 Received: from localhost (unknown [127.0.0.1]) by smtp-out.idnet.com (Postfix) with ESMTP id 32DA234F883 for ; Thu, 14 May 2009 14:37:11 +0000 (UTC) Received: from smtp-out.idnet.com ([127.0.0.1]) by localhost (smtp-out.idnet.com [127.0.0.1]) (amavisd-new, port 10040) with LMTP id fcsfd5Om0jZl for ; Thu, 14 May 2009 15:37:10 +0100 (BST) Received: from mail.idnet.net.uk (mail.idnet.net.uk [212.69.36.63]) by smtp-out.idnet.com (Postfix) with ESMTP id 28A212EF761 for ; Thu, 14 May 2009 15:37:10 +0100 (BST) Received: from [91.135.5.64] by mail.idnet.net.uk (GMS 15.01.3664/NU3963.00.7ca42f0c) with ESMTP id idgjksba for gdb@sourceware.org; Thu, 14 May 2009 15:37:08 +0100 Subject: RE: new port From: Jeremy Bennett Reply-To: jeremy.bennett@embecosm.com To: Anthony Berent Cc: 'Florent DEFAY' , gdb@sourceware.org In-Reply-To: <000001c9d49d$08c741c0$1a55c540$@Berent@arm.com> References: <8502af3c0905140623nece4f1dv1e03c2c841c59e42@mail.gmail.com> <000001c9d49d$08c741c0$1a55c540$@Berent@arm.com> Content-Type: text/plain Date: Thu, 14 May 2009 14:37:00 -0000 Message-Id: <1242311828.2994.39.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: 2009-05/txt/msg00077.txt.bz2 Hi Florent, I had this problem with the OpenRISC port. It was caused by incorrect prologue analysis, leading to the issues described by Hui Zhu and Anthony Berent. So I suggest looking at the skip_prologue function in your architectural description. In my case, the problem was due to wrongly caching a value rather than an address. I wrote a HOWTO for porting GDB, based on my experience with the OpenRISC. Some of that is now incorporated into the GNU Internals manual, but you may find the original application note helpful: http://www.embecosm.com/download/ean3.html HTH, Jeremy On Thu, 2009-05-14 at 15:05 +0100, Anthony Berent wrote: > Florent, > > I have also been porting to a new architecture, and recently solved similar > problems with next. The way next works is that, after a step, it checks > whether an extra frame has been added to the stack. If it has, and various > other checks are satisfied, then it places a breakpoint on the return > address and runs on. Otherwise it simply stops after the first step. > > Try stepping into the function using stepi, stopping at its first > instruction, and then having a look at the stack frames (using bt and "info > frames"). If these look wrong then that is probably your problem. > > - Anthony > > -----Original Message----- > From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf > Of Florent DEFAY > Sent: 14 May 2009 14:24 > To: gdb@sourceware.org > Subject: new port > > Hi, > > I work on porting GDB to a new arch. > I already ported GCC. > > I meet some problems, I need help. > > At the moment, I can use most of basic GDB commands. > > I can set breakpoints and stop on them. I can set breakpoints on function > names. > I can step. I can read locals and registers. > > When I use the command 'next', it should step and skip functions. The > problem is that > indeed it steps but it does not skip functions. It step into the function. > > Please help. > > > Regards. > > Florent > > -- Tel: +44 (1590) 610184 Cell: +44 (7970) 676050 SkypeID: jeremybennett Email: jeremy.bennett@embecosm.com Web: www.embecosm.com