From: Andrew Cagney <ac131313@cygnus.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: fnf@redhat.com, msnyder@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix problem with watchpoint test in gdb.base/commands.exp
Date: Thu, 02 May 2002 08:43:00 -0000 [thread overview]
Message-ID: <3CD15E8E.3020100@cygnus.com> (raw)
In-Reply-To: <200205021534.g42FYPq19248@duracef.shout.net>
> gdb.texinfo says:
>
> @value{GDBN} automatically deletes watchpoints that watch local
> (automatic) variables, or expressions that involve such variables, when
> they go out of scope, that is, when the execution leaves the block in
> which these variables were defined.
>
> I interpret "go out of scope" to be talking about stack frames,
> but it's likely that gdb can have bugs where it's checking for scope
> by looking at line numbers.
FYI, out of scope includes:
foo ()
{
int bar;
....
{
int bar;
.... <watch bar>
}
}
so there may not necessarily be a frame change. However, if the frame
has gone (or is being destroyed) the variable is out of scope.
> So actually I think that the right result for this use case is
> UNRESOLVED, which means that a human has to look at it each time.
>
> So I don't recommend this patch as is.
>
> How about this: enhance watchpoint_command_test to be two tests,
> one non-recursive, and one recursive. Then the non-recursive one
> will be simple non-controversial and it can PASS on either the last
> line of the callee or the next line of the caller. The recursive
> one will be trickier, it will have to look at the value of some
> recursion variable to make sure that it is in the correct scope.
>
> Michael C
Andrew
next prev parent reply other threads:[~2002-05-02 15:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-02 8:34 Michael Elizabeth Chastain
2002-05-02 8:43 ` Andrew Cagney [this message]
2002-05-02 8:50 ` Eli Zaretskii
2002-05-02 11:23 ` Michael Snyder
2002-05-02 23:46 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2002-05-02 8:48 Michael Elizabeth Chastain
2002-05-02 11:22 ` Michael Snyder
2002-05-01 16:48 Fred Fish
2002-05-01 16:58 ` Michael Snyder
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=3CD15E8E.3020100@cygnus.com \
--to=ac131313@cygnus.com \
--cc=fnf@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
--cc=msnyder@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