From: Fred Fish <fnf@fred.ninemoons.com>
To: gdb-patches@sources.redhat.com
Cc: fnf@redhat.com
Subject: [RFA] Fix problem with watchpoint test in gdb.base/commands.exp
Date: Wed, 01 May 2002 16:48:00 -0000 [thread overview]
Message-ID: <200205012349.g41NnE204012@fred.ninemoons.com> (raw)
This patch fixes the following problem.
57c57
< FAIL: gdb.base/commands.exp: continue with watch
---
> PASS: gdb.base/commands.exp: continue with watch
-Fred
2002-05-01 Fred Fish <fnf@redhat.com>
* gdb.base/commands.exp (watchpoint_command_test): Allow the
watchpoint to go out of scope on either the last line of the
factorial function or the location returned to in the caller.
Add comment describing rationale for this change.
Index: gdb.base/commands.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/commands.exp,v
retrieving revision 1.10
diff -c -p -r1.10 commands.exp
*** gdb.base/commands.exp 13 Dec 2001 22:42:23 -0000 1.10
--- gdb.base/commands.exp 1 May 2002 23:43:56 -0000
*************** proc watchpoint_command_test {} {
*** 330,337 ****
timeout {fail "(timeout) end commands on watch"}
}
send_gdb "continue\n"
gdb_expect {
! -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:57.*$gdb_prompt $" {
pass "continue with watch"
}
-re "$gdb_prompt $" {fail "continue with watch"}
--- 330,345 ----
timeout {fail "(timeout) end commands on watch"}
}
send_gdb "continue\n"
+ # Note that when watchpoints are implemented by software single
+ # stepping the inferior and evaluating the watchpoint at each
+ # step, local_var can go out of scope while we are in the function
+ # epilogue, such as when executing an instruction that restores the
+ # frame pointer to the callee value when local_var is accessed
+ # relative to the frame pointer. Thus the watchpoint may be
+ # deleted while we are still in the block for factorial, in the
+ # code corresponding to the closing brace.
gdb_expect {
! -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(57|82).*$gdb_prompt $" {
pass "continue with watch"
}
-re "$gdb_prompt $" {fail "continue with watch"}
next reply other threads:[~2002-05-01 23:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-01 16:48 Fred Fish [this message]
2002-05-01 16:58 ` Michael Snyder
2002-05-02 8:34 Michael Elizabeth Chastain
2002-05-02 8:43 ` Andrew Cagney
2002-05-02 8:50 ` Eli Zaretskii
2002-05-02 11:23 ` Michael Snyder
2002-05-02 23:46 ` Eli Zaretskii
2002-05-02 8:48 Michael Elizabeth Chastain
2002-05-02 11:22 ` 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=200205012349.g41NnE204012@fred.ninemoons.com \
--to=fnf@fred.ninemoons.com \
--cc=fnf@redhat.com \
--cc=gdb-patches@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