2012-04-29 Sergio Durigan Junior <sergiodj@redhat.com>
authorSergio Durigan Junior <sergiodj@redhat.com>
Sun, 29 Apr 2012 15:14:31 +0000 (15:14 +0000)
committerSergio Durigan Junior <sergiodj@redhat.com>
Sun, 29 Apr 2012 15:14:31 +0000 (15:14 +0000)
* tracepoint.c (start_tracing, stop_tracing): Checking for NULL
probes.

gdb/ChangeLog
gdb/tracepoint.c

index 1b05cdec293c976326ae215fdabe701f816a26e6..e2e10b3c1a0aae7e9a829ccb86ad11e5bebab9ee 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-29  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       * tracepoint.c (start_tracing, stop_tracing): Checking for NULL
+       probes.
+
 2012-04-29  Yao Qi  <yao@codesourcery.com>
 
        * gdb-code-style.el: New hook gdb-markup-hook
index e5b57e1a9264d945596c4e6be4093b970b58a6af..6e47a0a7dee642032dc4388015a4118e352e85db 100644 (file)
@@ -1783,7 +1783,8 @@ start_tracing (char *notes)
       t->number_on_target = b->number;
 
       for (loc = b->loc; loc; loc = loc->next)
-       loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch);
+       if (loc->probe != NULL)
+         loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch);
     }
   VEC_free (breakpoint_p, tp_vec);
 
@@ -1878,7 +1879,8 @@ stop_tracing (char *note)
             but we don't really care if this semaphore goes out of sync.
             That's why we are decrementing it here, but not taking care
             in other places.  */
-         loc->probe->pops->clear_semaphore (loc->probe, loc->gdbarch);
+         if (loc->probe != NULL)
+           loc->probe->pops->clear_semaphore (loc->probe, loc->gdbarch);
        }
     }