Call overloaded operators to perform operations on gdb.Value objects.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-value-cc.exp
index e6351f654181cb277552e143ebc8bb171dec4280..949f04fb6cf3e34f51bf3a32abf0228d8601e56d 100644 (file)
@@ -99,3 +99,7 @@ gdb_test "python print xtd\[x_fields\[1\]\]\['a'\]" "102" "xtd->a via field"
 gdb_test "python print len(uu_fields)" "2" "number of fields in uu"
 gdb_test "python print uu\[uu_fields\[0\]\]\['x'\]" "1000" "uu.x via field"
 gdb_test "python print uu\[uu_fields\[1\]\]\['a'\]" "1000" "uu.a via field"
+
+# Test overloaded operators.
+gdb_test_no_output "python a = gdb.parse_and_eval('a')" "init a"
+gdb_test "python print a + 5" "10" "a + 5"
This page took 0.026928 seconds and 4 git commands to generate.