public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/10729] New: non-stop && hw-watchpoint: Couldn't write debug register: No such process.
@ 2009-10-03  8:56 jan dot kratochvil at redhat dot com
  2010-03-13  8:51 ` [Bug threads/10729] " alfonso dot acosta at gmail dot com
  0 siblings, 1 reply; 5+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-10-03  8:56 UTC (permalink / raw)
  To: gdb-prs

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 <pthread.h>
#include <assert.h>
#include <unistd.h>

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-13 12:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10729-4717@http.sourceware.org/bugzilla/>
2011-11-06 22:47 ` [Bug threads/10729] non-stop && hw-watchpoint: Couldn't write debug register: No such process jan.kratochvil at redhat dot com
2011-12-14 17:21 ` cvs-commit at gcc dot gnu.org
2011-12-17  9:44 ` cvs-commit at gcc dot gnu.org
2024-01-13 12:19 ` ssbssa at sourceware dot org
2009-10-03  8:56 [Bug threads/10729] New: " jan dot kratochvil at redhat dot com
2010-03-13  8:51 ` [Bug threads/10729] " alfonso dot acosta at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).