Implement pahole-like 'ptype /o' option
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / stap-probe.c
index b728548779336ae8d59919fc356e48a94893e4ba..7596fe6a615ed706b9d546ca87f92f6e28750ee9 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2012-2016 Free Software Foundation, Inc.
+   Copyright 2012-2017 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
@@ -53,8 +53,13 @@ struct funcs
 static void
 m1 (void)
 {
+  /* m1 and m2 are equivalent, but because of some compiler
+     optimizations we have to make each of them unique.  This is why
+     we have this dummy variable here.  */
+  volatile int dummy = 0;
+
   if (TEST2)
-    STAP_PROBE (test, two);
+    STAP_PROBE1 (test, two, dummy);
 }
 
 static void
This page took 0.024807 seconds and 4 git commands to generate.