gdb/gdbserver/
authorYao Qi <yao@codesourcery.com>
Tue, 3 Jan 2012 02:26:52 +0000 (02:26 +0000)
committerYao Qi <yao@codesourcery.com>
Tue, 3 Jan 2012 02:26:52 +0000 (02:26 +0000)
* tracepoint.c (tracepoint_was_hit): Don't collect for
static tracepoint.

gdb/gdbserver/ChangeLog
gdb/gdbserver/tracepoint.c

index 207c7154cd64787aee26b3ddef5f7472504b4cc3..9a69fa2ef341f4a2e94a78c798b7fd057a4712bc 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-03  Yao Qi  <yao@codesourcery.com>
+
+       * tracepoint.c (tracepoint_was_hit): Don't collect for
+       static tracepoint.
+
 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
 
        * terminal.h: Reformat copyright header.
index fa4c317ccc79af6347746df3b934d07cfaaafefa..524fa775feaf63af88bc9a5cf94f8bc33b51aeba 100644 (file)
@@ -4268,8 +4268,12 @@ tracepoint_was_hit (struct thread_info *tinfo, CORE_ADDR stop_pc)
     {
       /* Note that we collect fast tracepoints here as well.  We'll
         step over the fast tracepoint jump later, which avoids the
-        double collect.  */
-      if (tpoint->enabled && stop_pc == tpoint->address)
+        double collect.  However, we don't collect for static
+        tracepoints here, because UST markers are compiled in program,
+        and probes will be executed in program.  So static tracepoints
+        are collected there.   */
+      if (tpoint->enabled && stop_pc == tpoint->address
+         && tpoint->type != static_tracepoint)
        {
          trace_debug ("Thread %s at address of tracepoint %d at 0x%s",
                       target_pid_to_str (tinfo->entry.id),