This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug threads/10729] New: non-stop && hw-watchpoint: Couldn't write debug register: No such process.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]