From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC/RFA] continue stepping if landed in new range of same line
Date: Wed, 19 Dec 2007 14:18:00 -0000 [thread overview]
Message-ID: <20071219141812.GA21072@caradoc.them.org> (raw)
In-Reply-To: <20071219075903.GA6184@adacore.com>
On Wed, Dec 19, 2007 at 11:59:03AM +0400, Joel Brobecker wrote:
> After the jump, the inferior stops and GDB finds that we stepped
> inside the last line of our function, and decides that we should
> stop:
>
> if (ecs->stop_func_end && ecs->sal.end >= ecs->stop_func_end)
> {
> /* If this is the last line of the function, don't keep stepping
> (it would probably step us out of the function).
> This is particularly necessary for a one-line function,
> in which after skipping the prologue we better stop even though
> we will be in mid-line. */
>
> This code predates the public CVS so I wasn't able to find much
> besides the comment. After reading this comment, I am no longer
> sure of what to do.
>
> The behavior that I observed is a bit surprising, and I am not sure that
> the comment above meant to include a case like mine. However, can we
> still maintain support for one-line functions, and yet handle the case
> above? After thinking about it for a while, I think it's possible, but
> it requires a bit a processing.
I don't like your patch very much, since it assumes things about code
based on the structure of the source (and there are some pathological
cases, like functions which start in one file and end in another).
I'd rather figure out if the above quoted code is still necessary. If
we were on the last line of the function and told to step, why
shouldn't we step out of it?
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-12-19 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-19 12:59 Joel Brobecker
2007-12-19 14:18 ` Daniel Jacobowitz [this message]
2007-12-20 5:40 ` Joel Brobecker
2007-12-20 14:08 ` Daniel Jacobowitz
2007-12-21 6:28 ` Joel Brobecker
2007-12-21 14:01 ` Daniel Jacobowitz
2007-12-22 6:03 ` Joel Brobecker
2007-12-22 18:05 ` Daniel Jacobowitz
2007-12-24 6:41 ` Joel Brobecker
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=20071219141812.GA21072@caradoc.them.org \
--to=drow@false.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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