+2020-01-10 George Barrett <bob@bob131.so>
+
+ * gdb.base/stap-probe.c: Rename USE_PROBES to USE_SEMAPHORES.
+ * gdb.base/stap-probe.exp: Likewise.
+ (stap_test): Pass argument as an additional flag.
+ (stap_test_no_debuginfo): Likewise.
+ (stap_test): Check `info probes stap' output for semaphore
+ addresses if the test binary is supposed to have them.
+
2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.tui/basic.exp: Add more scrolling tests.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#if USE_PROBES
+#if USE_SEMAPHORES
#define _SDT_HAS_SEMAPHORES
__extension__ unsigned short test_user_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes")));
global testfile hex srcfile
if {[prepare_for_testing "failed to prepare" ${exec_name} $srcfile \
- [concat $arg debug]]} {
+ [concat additional_flags=$arg debug]]} {
return -1
}
gdb_test "print \$_probe_argc" "No probe at PC $hex" \
"check argument not at probe point"
- gdb_test "info probes stap" \
- "test *user *$hex .*"
-
+ if {[string first "-DUSE_SEMAPHORES" $arg] != -1} {
+ gdb_test "info probes stap" \
+ "test *user *$hex *$hex .*"
+ } else {
+ gdb_test "info probes stap" \
+ "test *user *$hex .*"
+ }
+
if {[runto "-pstap test:user"]} {
pass "run to -pstap test:user"
} else {
global testfile hex
if {[prepare_for_testing "failed to prepare" ${exec_name} ${testfile}.c \
- {$arg nodebug optimize=-O2}]} {
+ [concat additional_flags=$arg nodebug optimize=-O2]]} {
return -1
}
}
with_test_prefix "with semaphore, not optimized" {
- stap_test "stap-probe-sem-noopt" "-DUSE_PROBES"
+ stap_test "stap-probe-sem-noopt" "-DUSE_SEMAPHORES"
}
with_test_prefix "without semaphore, optimized" {
}
with_test_prefix "with semaphore, optimized" {
- stap_test_no_debuginfo "stap-probe-sem-opt" "-DUSE_PROBES"
+ stap_test_no_debuginfo "stap-probe-sem-opt" "-DUSE_SEMAPHORES"
}