public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Theodore A. Roth" <troth@openavr.org>
To: Kris Warkentin <kewarken@qnx.com>
Cc: "Gdb@Sources.Redhat.Com" <gdb@sources.redhat.com>
Subject: Re: (remote) hellishly slow single stepping over library calls
Date: Fri, 16 May 2003 18:50:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.53.0305161134440.746@knuth.amplepower.com> (raw)
In-Reply-To: <071001c31bd8$841db090$0202040a@catdog>



On Fri, 16 May 2003, Kris Warkentin wrote:

:) When debugging using our QNX pdebug remote protocol and single stepping over
:) a library call like printf, it takes a LOOOONG time.  I'm talking like two
:) or three minutes.  A 'next' is fine but looking at the output of running our
:) pdebug server in verbose mode, gdb is doing step, step, step, all the way
:) through the whole library call.  Every single step results in fetching
:) registers and there is a huge amount of wire traffic generated.
:)
:) This didn't happen with older (ie 5.0) gdbs which didn't seem to know how to
:) single step through our shared lib code but now that it does, this is pretty
:) painful.  Obviously it makes more sense to 'next' over a library call,
:) especially if you don't want to go into it but the question is, can anyone
:) think of a way to optimize this?  I though of putting in a hack like:
:)
:) if (reg == PC_REGNUM)
:)     only_get_pc();
:)
:) to avoid fetching the whole regset but it probably won't make that much
:) difference since there's still a packet over the wire each time and most
:) regsets fit in one packet anyway.
:)
:) Would this problem also exist with the normal remote protocol?  (stupid
:) users...clicking step instead of next....;-)

Not sure if this is totally related (how does pdebug differ from rsp?)
but maybe a solution could help avr users too.

Some sort of optimization here would be boon for avr users. In our
case we use gdb to talk to our avarice program
(http://sourceforge.net/projects/avarice) which talks to a jtagice box
which in turn talks to the actual target device via a jtag interface.
Single stepping is painfully slow: step, wait 1-5 seconds, step, etc.

The bottleneck for us not so much sending info over the wire via rsp,
but in reading the registers from the device via jtag. If we could
reduce the number registers that need to be read at each step, I think
it could speed things up.

For comparision, I also have a avr simulator which is controlled by
gdb via rsp. Single stepping in the simulator is fairly fast (feels
almost as fast as stepping a native program).

Ted Roth

  reply	other threads:[~2003-05-16 18:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-16 18:25 Kris Warkentin
2003-05-16 18:50 ` Theodore A. Roth [this message]
2003-05-16 18:57   ` Kris Warkentin
2003-05-16 19:15 ` Quality Quorum
2003-05-16 19:24   ` Kris Warkentin
2003-05-16 19:29     ` Daniel Jacobowitz
2003-05-16 20:04       ` Kris Warkentin
2003-05-16 23:10         ` Quality Quorum
2003-05-17  3:39       ` Andrew Cagney

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=Pine.LNX.4.53.0305161134440.746@knuth.amplepower.com \
    --to=troth@openavr.org \
    --cc=gdb@sources.redhat.com \
    --cc=kewarken@qnx.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).