GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / tsv.exp
index 4177d137ded308d087b9669ba39ce0be5bf0899b..f146745c843ef13571a959fa7427d057d454d96c 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2009-2013 Free Software Foundation, Inc.
+#   Copyright 2009-2016 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
@@ -188,3 +188,25 @@ gdb_test_multiple "target ctf ${tracefile}.ctf" "" {
        check_tsv "ctf"
     }
 }
+
+# Restart.
+clean_restart ${binfile}
+
+if ![runto_main] then {
+    fail "Can't run to main"
+    return
+}
+
+# If there are predefined TSVs, test these predefined TSVs are correctly
+# uploaded.
+if [target_info exists gdb,predefined_tsv] {
+    set tsv [target_info gdb,predefined_tsv]
+
+    # Test predefined TSVs are uploaded.
+    gdb_test "info tvariables" ".*${tsv}.*" "predefined tsvs are uploaded"
+} else {
+    # Otherwise (the predefined TSVs are not defined in the board file),
+    # test there is no TSVs in GDB.
+    gdb_test "info tvariables" "No trace state variables\." \
+       "no predefined tsvs"
+}
This page took 0.024567 seconds and 4 git commands to generate.