public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>, cagney@redhat.com
Cc: sid@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: sid debugger interface extension: step out-of-range packet support
Date: Fri, 22 Feb 2002 17:05:00 -0000	[thread overview]
Message-ID: <3C76E8F3.673C6559@redhat.com> (raw)
In-Reply-To: <20020212171421.D13536@redhat.com>

"Frank Ch. Eigler" wrote:
> 
> Hi -
> 
> A small amount of new code in sid/include and sid/component/gdb
> now allows gdb's "step out-of-range" packet ('e'/'E') to work with
> all sid-based simulator targets.  This packet makes remote debugging
> potentially significantly faster, because it can replace a sequence of
> instruction single-step packets with just one new packet.  This finally
> exercises J.T. Conklin's gdb-side extensions from roughly a year ago.
> 
> There is a gdb bug that is exposed by this support.  If a breakpoint
> placed on the current instruction, and another one on the next
> source line, then letting gdb "step" will stop at the next line, but
> won't let gdb realize that the second breakpoint was hit.  (This is
> because gdb never inserted the breakpoints in gdb/infrun.c's proceed(),
> being unaware that remote_resume() meant something other than stepi.)
> This looks like this is a minor problem, but just in case, support for
> the packet may be forced off from the gdb side and/or from the sid side.

Thanks for pointing out this problem, which is in fact
more severe than you think.

A quick experiment reveals that if you 
  1) put a breakpoint at the beginning of line N
  2) put a second breakpoint in the MIDDLE of line N
  3) attempt to step over line N
the second breakpoint will not be hit.

And in fact, if you have a multi-threaded program, 
all threads will have the opportunity to run (if they
are runnable), and NONE of them will hit ANY breakpoints
while we are executing line N.  This will give threads
the opportunity to "run away".

  parent reply	other threads:[~2002-02-23  1:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-12 14:14 Frank Ch. Eigler
2002-02-12 22:10 ` Andrew Cagney
2002-02-13  7:13   ` Frank Ch. Eigler
2002-02-13 12:52     ` Andrew Cagney
2002-02-22 17:08     ` Michael Snyder
2002-02-22 17:05 ` Michael Snyder [this message]
2002-02-22 19:28   ` Frank Ch. Eigler

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=3C76E8F3.673C6559@redhat.com \
    --to=msnyder@redhat.com \
    --cc=cagney@redhat.com \
    --cc=fche@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=sid@sources.redhat.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).