public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: "Joseph S. Myers" <jsm28@cam.ac.uk>
Cc: Zack Weinberg <zack@codesourcery.com>, gcc@gcc.gnu.org
Subject: Re: Request of new __attribute__ for switch statements (elimination of the bounds check)
Date: Wed, 16 Oct 2002 11:19:00 -0000	[thread overview]
Message-ID: <20021016172605.GA1930@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.33.0210160920540.17632-100000@kern.srcf.societies.cam.ac.uk>

On Wed, Oct 16, 2002 at 09:23:40AM +0100, Joseph S. Myers wrote:
> On Tue, 15 Oct 2002, Zack Weinberg wrote:
> 
> > (If I had a nickel for every time I've wanted a "step backward"
> > command in gdb...)
> 
> <http://www.uwsg.iu.edu/hypermail/linux/kernel/9901.2/0531.html>:
> 
> #  I have enough information available in the proxy ptrace filter to
> #  implement PTRACE_SINGLESTEP_BACKWARDS. How would you like to have that
> #  capability in gdb? "Execute backwards until this data watchpoint
> #  changes." Imagine a graphical debugger with a scrollbar for time,
> #  where the top is "beginning of execution" and the bottom is "end of
> #  execution."
> 
> (AFAIK there still isn't a useful "step backwards" capability based on
> this technology.)

Well, it can be a bogglingly hard computational problem to do this in
any program which does significant computation. From what I can see
this works by recording the state of the program at system calls and
the effects of system calls on the process.

One downside of using this information for step-backwards would be,
you'd need to replay from the last syscall checkpoint up to the point
you want to step backwards from.  Which would probably involve keeping
a tremendous amount of data (in order to know what memory looked like
at the last checkpoint) and working out the effect of a possibly large
number of instructions since that last syscall point.

Also note that it says it doesn't support signals or shared memory. 
They break the complete-control model that it uses to run replays.  I
suspect it has problems with a lot of recent forms of IPC, too.

I've got to give Michael credit, this is an amazing hack he put
together.  I don't know that it scales in the modern world, though.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

  parent reply	other threads:[~2002-10-16 17:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-11 13:20 Kevin Lawton
2002-10-12  4:18 ` Ralph Loader
2002-10-14  8:31 ` Richard Zidlicky
2002-10-14 10:09   ` Dale Johannesen
2002-10-14 21:11 ` Jamie Lokier
2002-10-14 22:01   ` Zack Weinberg
2002-10-15  8:12     ` Michael Matz
2002-10-15 19:15       ` Zack Weinberg
2002-10-15 19:18         ` Dale Johannesen
2002-10-16 14:07           ` Richard Henderson
2002-10-15 21:16         ` Kevin Lawton
2002-10-15 23:40           ` Tim Hollebeek
2002-10-16  3:40             ` Michael Matz
2002-10-16 13:38               ` Tim Hollebeek
2002-10-16 14:23                 ` Michael Matz
2002-10-16 13:27             ` Hartmut Schirmer
2002-10-16  3:25         ` Joseph S. Myers
2002-10-16  7:57           ` Fergus Henderson
2002-10-16 11:19           ` Daniel Jacobowitz [this message]
2002-10-15  7:54   ` Michael Matz
2002-10-15 13:29     ` Jamie Lokier
2002-10-15 14:06       ` Kevin Lawton
2002-10-15 15:32         ` Jamie Lokier
2002-10-15 14:28       ` Michael Matz
2002-10-15 15:19         ` Jamie Lokier
2002-10-11 13:22 Robert Dewar
2002-10-11 15:12 ` Kevin Lawton
2002-10-12 10:43   ` Alexandre Oliva
2002-10-15  6:43 Mattias Engdegård
2002-10-15 22:40 Robert Dewar
2002-10-15 23:57 ` Zack Weinberg
2002-10-16  9:19 Robert Dewar

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=20021016172605.GA1930@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jsm28@cam.ac.uk \
    --cc=zack@codesourcery.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).