From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23776 invoked by alias); 24 Oct 2007 16:47:18 -0000 Received: (qmail 23767 invoked by uid 22791); 24 Oct 2007 16:47:17 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 24 Oct 2007 16:47:15 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 41A1B9833F; Wed, 24 Oct 2007 16:47:13 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 26B0D981F2; Wed, 24 Oct 2007 16:47:13 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IkjNw-0001A8-6K; Wed, 24 Oct 2007 12:47:12 -0400 Date: Wed, 24 Oct 2007 16:51:00 -0000 From: Daniel Jacobowitz To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [rfc, rfa/doc] Multi-threaded watchpoint improvements Message-ID: <20071024164712.GB4025@caradoc.them.org> Mail-Followup-To: Luis Machado , gdb-patches@sourceware.org References: <20070916183949.GA23966@caradoc.them.org> <20071001002015.GA15835@caradoc.them.org> <1193241369.4316.4.camel@localhost> <20071024154640.GA949@caradoc.them.org> <1193246520.4316.16.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1193246520.4316.16.camel@localhost> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00588.txt.bz2 On Wed, Oct 24, 2007 at 02:22:00PM -0300, Luis Machado wrote: > Hi Daniel, > > This is what i get while trying to use a hardware watchpoint to monitor > an int variable "i" that changes during a for statement (attached). Upon > further investigation, it seems GDB is only calling > "breakpoint_delete_event". I don't see GDB calling > "breakpoint_create_event" anywhere except in the momment i created the > watchpoint up there, so i presume that's the reason it's not triggering. That's the only time it is supposed to be called; it's the event at the creation of a breakpoint. THe user creates it, it lives until it is deleted. > (gdb) watch i > During symbol reading, incomplete CFI data; unspecified registers (e.g., > r0) at 0x10000738. > breakpoint_create_event (CREATED!) > Hardware watchpoint 2: i > (gdb) n > 41 res = pthread_create(&threads[i], > (gdb) > [New Thread 0x40000a26240 (LWP 3290)] > breakpoint_delete_event (DELETED! After this point, no more creations.) GDB has stopped for some reason and checked whether the watchpoint on i is still in scope. It thinks it isn't. This may be an unwinder problem. Since the scope is gone, the watchpoint is deleted. When you have a problem with watchpoints it's useful to remember that watchpoints on local variables are by far the most complicated kind. See if they still work on a global variable or a memory location. -- Daniel Jacobowitz CodeSourcery