From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31046 invoked by alias); 16 Apr 2002 05:03:07 -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 31027 invoked from network); 16 Apr 2002 05:03:04 -0000 Received: from unknown (HELO is.elta.co.il) (199.203.121.2) by sources.redhat.com with SMTP; 16 Apr 2002 05:03:04 -0000 Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id JAA14359; Tue, 16 Apr 2002 09:01:39 +0300 (IDT) Date: Mon, 15 Apr 2002 22:03:00 -0000 From: Eli Zaretskii X-Sender: eliz@is To: Doug Evans cc: gdb@sources.redhat.com Subject: Re: does bpstat_print stop printing prematurely? In-Reply-To: <200204152003.NAA11126@casey.transmeta.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-04/txt/msg00259.txt.bz2 On Mon, 15 Apr 2002, Doug Evans wrote: > What if there is 1 breakpoint that triggers and two watchpoints? Do you actually have an example of this, or can craft one? You see, I think it's all but impossible to have a breakpoint and a watchpoint trigger at the same PC. That's because the CPU carefully designs its faults and traps so that one always preceeds the other. (For soft breakpoints, the ones implemented by inserting a breakpoint opcode into the code, doing so overwrites the instruction that would have caused a watchpoint to trigger, so the simultaneous triggering is again impossible.) > As a user, whenever execution stops I'd kinda like to know which > of all of my active watchpoints triggered without having to > manually examine each one. GDB should already cite all the watchpoints that trigger, unless there's a bug. Again, please provide a specific example of a failure, if you can. > Things are even more confusing if gdb prints some but not all > of the triggering watchpoints. Cannot reproduce this on my machine with GDB 5.1.1: if I set two watchpoints on the same address, GDB announces both of them. Please tell what OS did you try that on, and which version of GDB was that. > Example: Suppose the `bs' arg to bpstat_print contains a watchpoint, > a pc breakpoint, and another watchpoint, in that order. > > Currently bpstat_print will print the first watchpoint and the > pc breakpoint but not the second watchpoint. Blech. An example program that exhibits this behavior would be nice. Thanks.