From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5070 invoked by alias); 17 Feb 2006 15:48:56 -0000 Received: (qmail 5056 invoked by uid 22791); 17 Feb 2006 15:48:56 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Feb 2006 15:48:54 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FA7qB-0003MD-BA for gdb@sources.redhat.com; Fri, 17 Feb 2006 16:48:17 +0100 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Feb 2006 16:48:15 +0100 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Feb 2006 16:48:15 +0100 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: MI: reporting of multiple breakpoints Date: Fri, 17 Feb 2006 16:04:00 -0000 Message-ID: References: <20060217153211.GA21402@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00188.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Feb 17, 2006 at 06:01:13PM +0300, Vladimir Prus wrote: >> >> Hello! >> It seems that for stop on multiple breakpoints, MI reports only one: >> >> (gdb) >> -break-insert main >> ^done,bkpt={number="1",type="breakpoint"..... >> (gdb) >> -break-insert main >> ^done,bkpt={number="2",type="breakpoint"...... >> (gdb) >> -exec-run >> ^running >> (gdb) >> *stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={...} >> >> Is this a bug, or by design? > > The CLI does the same thing; so does the core of GDB, unsurprisingly. For ordinary breakpoints, yes. For watchpoints, not quite: (gdb) watch p1 Hardware watchpoint 3: p1 (gdb) watch p1 Hardware watchpoint 4: p1 (gdb) c Continuing. Hardware watchpoint 3: p1 Old value = (int *) 0x0 New value = (int *) 0x8049994 Hardware watchpoint 4: p1 Old value = (int *) 0x0 New value = (int *) 0x8049994 main () at print_pointers.cpp:27 27 B* p2 = (B*)0x12345678; while in MI we get: -break-watch p1 ^done,wpt={number="2",exp="p1"} (gdb) -break-watch p2 ^done,wpt={number="3",exp="p2"} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger", wpt={number="2",exp="p1"}, value={old="(int *) 0x0",new="(int *) 0x8049994"}, thread-id="1",frame={...} CLI reports two watchpoints, and MI reports just one. I did not test more complex combinations, like mix of watchpoints and breakpoints that trigger on the same line. > It's not entirely obvious what ought to happen. Well, all breakpoints which stop conditions are satisfied should be reported, I guess. - Volodya