From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21455 invoked by alias); 2 Apr 2002 21:55:23 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21435 invoked from network); 2 Apr 2002 21:55:20 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 2 Apr 2002 21:55:20 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id NAA07898 for ; Tue, 2 Apr 2002 13:55:16 -0800 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma007857; Tue, 2 Apr 02 13:54:45 -0800 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id g32LsmN20822 for ; Tue, 2 Apr 2002 13:54:48 -0800 (PST) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id NAA10074; Tue, 2 Apr 2002 13:54:47 -0800 Date: Tue, 02 Apr 2002 13:55:00 -0000 Message-Id: <200204022154.NAA10074@casey.transmeta.com> X-Authentication-Warning: casey.transmeta.com: dje set sender to dje@casey.transmeta.com using -f From: Doug Evans To: gdb@sources.redhat.com Subject: STOPPED_BY_WATCHPOINT peculiarity X-SW-Source: 2002-04/txt/msg00008.txt.bz2 Something is not right, or at least confusing, in watchpoint-land. This code in infrun.c is odd: /* It may be possible to simply continue after a watchpoint. */ if (HAVE_CONTINUABLE_WATCHPOINT) STOPPED_BY_WATCHPOINT (ecs->ws); STOPPED_BY_WATCHPOINT is a predicate. Therefore at first glance this code is pointless. Things are slightly less confusing by recognizing that in the process of computing STOPPED_BY_WATCHPOINT some debugging printf's may get printed. e.g. grep for maint_show_dr in i386-nat.c:i386_stopped_data_address. nm-i386.h: #define STOPPED_BY_WATCHPOINT(W) (i386_stopped_data_address () != 0) Is that all there is to it? If so, a comment should be added, maybe something like - /* It may be possible to simply continue after a watchpoint. */ + /* It may be possible to simply continue after a watchpoint. + While at first glance this code is pointless, STOPPED_BY_WATCHPOINT + is called in case there are any maintenance debugging printf's. */ if (HAVE_CONTINUABLE_WATCHPOINT) STOPPED_BY_WATCHPOINT (ecs->ws);