Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jeremy Bennett <jeremy.bennett@embecosm.com>
To: "nagaraju.m" <nagaraju.m@redpinesignals.com>
Cc: gdb@sourceware.org
Subject: Re: next
Date: Thu, 02 Jul 2009 13:50:00 -0000	[thread overview]
Message-ID: <1246542606.21485.21.camel@thomas> (raw)
In-Reply-To: <4A4C9584.2020302@redpinesignals.com>

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


  reply	other threads:[~2009-07-02 13:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 11:22 next nagaraju.m
2009-07-02 13:50 ` Jeremy Bennett [this message]
2009-07-03 12:45 nagaraju.m
2009-07-07 10:40 ` Re:next Jeremy Bennett
2009-07-07 11:53   ` next nagaraju.m
2009-07-07 15:19     ` next Jeremy Bennett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246542606.21485.21.camel@thomas \
    --to=jeremy.bennett@embecosm.com \
    --cc=gdb@sourceware.org \
    --cc=nagaraju.m@redpinesignals.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox