From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4871 invoked by alias); 2 Jul 2009 13:50:25 -0000 Received: (qmail 4861 invoked by uid 22791); 2 Jul 2009 13:50:24 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_81 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, 02 Jul 2009 13:50:13 +0000 Received: from localhost (unknown [127.0.0.1]) by smtp-out.idnet.com (Postfix) with ESMTP id A89452D8274 for ; Thu, 2 Jul 2009 13:50:09 +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 pAy49Xpy5agb for ; Thu, 2 Jul 2009 14:50:08 +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 600432D82D0 for ; Thu, 2 Jul 2009 14:50:08 +0100 (BST) Received: from [91.135.5.64] by mail.idnet.net.uk (GMS 15.02.3689/NU3963.00.7ca42f0c) with ESMTP id ufkjgvba for gdb@sourceware.org; Thu, 2 Jul 2009 14:50:05 +0100 Subject: Re: next From: Jeremy Bennett Reply-To: jeremy.bennett@embecosm.com To: "nagaraju.m" Cc: gdb@sourceware.org In-Reply-To: <4A4C9584.2020302@redpinesignals.com> References: <4A4C9584.2020302@redpinesignals.com> Content-Type: text/plain Date: Thu, 02 Jul 2009 13:50:00 -0000 Message-Id: <1246542606.21485.21.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-07/txt/msg00008.txt.bz2 On Thu, 2009-07-02 at 16:39 +0530, nagaraju.m wrote: > Hi all, > > I have ported gdb-6.8 to my target. But when i am debugging using > new gdb i found that Next command is not working. Even i use next it is > just single stepping... > > Can any one please help me out. > > Thanks in advance, > Nagaraju.M Hi Nagaraju, I ran into the same problem with a port of GDB I did last year. From memory, in that case, the problem was with my prologue analysis, giving GDB some very strange information, which confused "next". How do "step", "stepi" and "continue" behave for you? If you are connecting to your target remotely, you can glean a lot of information by looking at the Remote Serial Protocol (RSP) packet exchanges. "next" may use some single instruction stepping if it thinks it is currently in a function prologue or the middle of a high level instruction, to get to the clean start of a high level instruction. It will then set a breakpoint after that high level instruction and run to that breakpoint. "next" could be failing if it can't single step, or it can't get reliable information about the start of high level instructions or end of function prologues, or if breakpoints aren't working correctly. I wrote an application note last year on RSP, which has some GDB client function traces for various GDB commands. I didn't include "next", but "step" and "continue" may help you. http://www.embecosm.com/download/ean4.html Hope this is useful. Jeremy -- Tel: +44 (1590) 610184 Cell: +44 (7970) 676050 SkypeID: jeremybennett Email: jeremy.bennett@embecosm.com Web: www.embecosm.com