From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30386 invoked by alias); 3 Oct 2009 08:56:54 -0000 Received: (qmail 30372 invoked by uid 48); 3 Oct 2009 08:56:54 -0000 Date: Sat, 03 Oct 2009 08:56:00 -0000 From: "jan dot kratochvil at redhat dot com" To: gdb-prs@sourceware.org Message-ID: <20091003085653.10729.jan.kratochvil@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug threads/10729] New: non-stop && hw-watchpoint: Couldn't write debug register: No such process. X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00020.txt.bz2 Hardware watchpoints are now global, they are carbon-copied to each LWP. If any of the LWPs are currently not stopped the carbon-copying fails. Either the running LWPs should be left with stale hw-watchpoints (probably not) or the running LWPs should be rather transparently temporarily stopped for a moment to update their hardware watchpoint registers. ------------------------------------------------------------------------------ (gdb) set non-stop on (gdb) set target-async on (gdb) b start Breakpoint 1 at 0x400620: file /home/jkratoch/t/x2.c, line 9. (gdb) r Starting program: /home/jkratoch/t/x2 [Thread debugging using libthread_db enabled] [New Thread 0x7ffff7fe2910 (LWP 20704)] Breakpoint 1, start (arg=0x0) at /home/jkratoch/t/x2.c:9 9 sleep (1); (gdb) info threads 2 Thread 0x7ffff7fe2910 (LWP 20704) start (arg=0x0) at /home/jkratoch/t/x2.c:9 * 1 Thread 0x7ffff7fe36f0 (LWP 20701) (running) (gdb) thread 2 [Switching to thread 2 (Thread 0x7ffff7fe2910 (LWP 20704))]#0 start (arg=0x0) at /home/jkratoch/t/x2.c:9 9 sleep (1); (gdb) watch var Hardware watchpoint 2: var (gdb) c Continuing. Couldn't write debug register: No such process. (gdb) ------------------------------------------------------------------------------ #include #include #include static volatile int var; static void *start (void *arg) { sleep (1); var = 1; return arg; } int main (void) { pthread_t thread1; int i; i = pthread_create (&thread1, NULL, start, NULL); assert (i == 0); i = pthread_join (thread1, NULL); assert (i == 0); return 0; } -- Summary: non-stop && hw-watchpoint: Couldn't write debug register: No such process. Product: gdb Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: threads AssignedTo: unassigned at sourceware dot org ReportedBy: jan dot kratochvil at redhat dot com CC: gdb-prs at sourceware dot org GCC host triplet: x86_64-fedora11-linux-gnu GCC target triplet: x86_64-fedora11-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=10729 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.