From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10795 invoked by alias); 1 May 2002 23:48:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10782 invoked from network); 1 May 2002 23:48:46 -0000 Received: from unknown (HELO fred.ninemoons.com) (68.14.214.217) by sources.redhat.com with SMTP; 1 May 2002 23:48:46 -0000 Received: (from fnf@localhost) by fred.ninemoons.com (8.11.6/8.11.6) id g41NnE204012; Wed, 1 May 2002 16:49:14 -0700 From: Fred Fish Message-Id: <200205012349.g41NnE204012@fred.ninemoons.com> Subject: [RFA] Fix problem with watchpoint test in gdb.base/commands.exp To: gdb-patches@sources.redhat.com Date: Wed, 01 May 2002 16:48:00 -0000 Cc: fnf@redhat.com Reply-To: fnf@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00019.txt.bz2 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 * 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"}