Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jimb@codesourcery.com
Cc: sascha@pasalacqua.de, gdb@sourceware.org
Subject: Re: How to interrupt a stepping GDB ?
Date: Mon, 03 Jul 2006 19:20:00 -0000	[thread overview]
Message-ID: <200607031917.k63JHkrA004919@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <vt2u05yczkx.fsf@theseus.home.> (message from Jim Blandy on Mon, 	03 Jul 2006 11:28:46 -0700)

> From: Jim Blandy <jimb@codesourcery.com>
> Date: Mon, 03 Jul 2006 11:28:46 -0700
> 
> Maybe this has been discussed before, but:
> 
> Should 'step' stop stepping if the PC fails to make forward progress?
> In every situation I can think of, that would mean that a loop
> iteration has been completed.  It shouldn't affect loops that cover
> more than one line.

I think that's wrong; "step" operators on a line-level, not statement
level.

> But it might be confusing to the user: "I told it to step, and nothing
> happened!"

I think that would indeed be a problem.

The solution for the problem is to change the source code such that
there actually is a statement inside the loop:

  while(a)
    a--;

or perhaps

  for (; a; a--)
    ;

will even work.

Mark


  reply	other threads:[~2006-07-03 19:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 12:24 Daniel Jacobowitz
2006-07-03 18:28 ` Jim Blandy
2006-07-03 19:20   ` Mark Kettenis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha
2006-06-19  2:13 Sascha

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=200607031917.k63JHkrA004919@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb@sourceware.org \
    --cc=jimb@codesourcery.com \
    --cc=sascha@pasalacqua.de \
    /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