diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1ed9a21d3a1..c63ea72e5f9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2016-09-11 Sergio Durigan Junior + Jan Kratochvil + + * gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to + make m1's definition to be different from m2's. Use 'dummy' as an + argument for probe 'two'. + 2016-09-10 Jon Beniston * lib/mi-support.exp (mi_gdb_target_load): Use target_sim_options diff --git a/gdb/testsuite/gdb.base/stap-probe.c b/gdb/testsuite/gdb.base/stap-probe.c index b7285487793..5a77435df81 100644 --- a/gdb/testsuite/gdb.base/stap-probe.c +++ b/gdb/testsuite/gdb.base/stap-probe.c @@ -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