Fix scripted probe breakpoints
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.guile / scm-breakpoint.c
index 5675e7b81d50903b60b7900c9fc505942e4d9c20..ed7dbdba917ff5e1be7a86d5a2c9887a5766424a 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010-2016 Free Software Foundation, Inc.
+   Copyright 2010-2019 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see  <http://www.gnu.org/licenses/>.  */
 
+#ifdef USE_PROBES
+#include <sys/sdt.h>
+#endif
+
 int result = 0;
 
 int multiply (int i)
@@ -38,6 +42,9 @@ int main (int argc, char *argv[])
     {
       result += multiply (foo);  /* Break at multiply. */
       result += add (bar); /* Break at add. */
+#ifdef USE_PROBES
+      DTRACE_PROBE1 (test, result_updated, result);
+#endif
     }
 
   return 0; /* Break at end. */
This page took 0.02542 seconds and 4 git commands to generate.