+2008-09-10 Joel Brobecker <brobecker@adacore.com>
+
+ * gdb.ada/array_bounds.exp, gdb.ada/array_subscript_addr.exp,
+ gdb.ada/arrayidx.exp, gdb.ada/arrayparam.exp, gdb.ada/arrayptr.exp,
+ gdb.ada/assign_1.exp, gdb.ada/boolean_expr.exp,
+ gdb.ada/char_param.exp, gdb.ada/exprs.exp, gdb.ada/fixed_cmp.exp,
+ gdb.ada/fixed_points.exp, gdb.ada/fun_addr.exp,
+ gdb.ada/funcall_param.exp, gdb.ada/homonym.exp,
+ gdb.ada/interface.exp, gdb.ada/null_array.exp,
+ gdb.ada/packed_array.exp, gdb.ada/packed_tagged.exp,
+ gdb.ada/print_chars.exp, gdb.ada/print_pc.exp,
+ gdb.ada/str_ref_cmp.exp, gdb.ada/sym_print_name.exp,
+ gdb.ada/taft_type.exp, gdb.ada/tagged.exp, gdb.ada/type_coercion.exp:
+ Include the "= " sequence in the expected output of print tests.
+
2008-09-10 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/packed_tagged.exp: Accept "boolean" as a valid type
}
gdb_test "print itable'first" \
- "2" \
+ "= 2" \
"print itable'first"
gdb_test "print itable'last" \
- "5" \
+ "= 5" \
"print itable'last"
gdb_test "print table'first" \
- "zero" \
+ "= zero" \
"print table'first"
gdb_test "print table'last" \
- "two" \
+ "= two" \
"print table'last"
# Verify that we can compare a string slice with another string.
gdb_test "print a(2)'Address" \
- "\\(system\\.address\\) 0x\[0-9a-fA-F\]+" \
+ "= \\(system\\.address\\) 0x\[0-9a-fA-F\]+" \
"print a(2)'Address"
"set print array-indexes to off"
gdb_test "print one_two_three" \
- "\\(1, 2, 3\\)" \
+ "= \\(1, 2, 3\\)" \
"print one_two_three, indexes off"
gdb_test "print e_one_two_three" \
- "\\(1, 2, 3\\)" \
+ "= \\(1, 2, 3\\)" \
"print e_one_two_three, indexes off"
gdb_test "print r_two_three" \
- "\\(two => 2, 3\\)" \
+ "= \\(two => 2, 3\\)" \
"print r_two_three, indexes off"
gdb_test "print u_one_two_three" \
- "\\(1, 2, 3\\)" \
+ "= \\(1, 2, 3\\)" \
"print u_one_two_three, indexes off"
gdb_test "print p_one_two_three" \
- "\\(0 => false, true, true\\)" \
+ "= \\(0 => false, true, true\\)" \
"print p_one_two_three, indexes off"
gdb_test "print few_reps" \
- "\\(1, 2, 3, 3, 3, 3, 3, 4, 5\\)" \
+ "= \\(1, 2, 3, 3, 3, 3, 3, 4, 5\\)" \
"print few_reps, indexes off"
gdb_test "print many_reps" \
- "\\(1, 2, 3 <repeats 12 times>, 4, 5\\)" \
+ "= \\(1, 2, 3 <repeats 12 times>, 4, 5\\)" \
"print many_reps, indexes off"
gdb_test "print empty" \
- "\\(\\)" \
+ "= \\(\\)" \
"print empty, indexes off"
# Next, print all the arrays with the indexes
"set print array-indexes to on"
gdb_test "print one_two_three" \
- "\\(1 => 1, 2 => 2, 3 => 3\\)" \
+ "= \\(1 => 1, 2 => 2, 3 => 3\\)" \
"print one_two_three"
gdb_test "print e_one_two_three" \
- "\\(one => 1, two => 2, three => 3\\)" \
+ "= \\(one => 1, two => 2, three => 3\\)" \
"print e_one_two_three"
gdb_test "print r_two_three" \
- "\\(two => 2, three => 3\\)" \
+ "= \\(two => 2, three => 3\\)" \
"print r_two_three"
gdb_test "print u_one_two_three" \
- "\\(1 => 1, 2 => 2, 3 => 3\\)" \
+ "= \\(1 => 1, 2 => 2, 3 => 3\\)" \
"print u_one_two_three"
gdb_test "print p_one_two_three" \
- "\\(0 => false, 1 => true, 2 => true\\)" \
+ "= \\(0 => false, 1 => true, 2 => true\\)" \
"print p_one_two_three"
gdb_test "print few_reps" \
- "\\(1 => 1, 2 => 2, 3 => 3, 4 => 3, 5 => 3, 6 => 3, 7 => 3, 8 => 4, 9 => 5\\)" \
+ "= \\(1 => 1, 2 => 2, 3 => 3, 4 => 3, 5 => 3, 6 => 3, 7 => 3, 8 => 4, 9 => 5\\)" \
"print few_reps"
gdb_test "print many_reps" \
- "\\(1 => 1, 2 => 2, 3 => 3 <repeats 12 times>, 15 => 4, 16 => 5\\)" \
+ "= \\(1 => 1, 2 => 2, 3 => 3 <repeats 12 times>, 15 => 4, 16 => 5\\)" \
"print many_reps"
gdb_test "print empty" \
- "\\(\\)" \
+ "= \\(\\)" \
"print empty"
# works without problem.
gdb_test "print call_me (\"bonjour\")" \
- "void" \
+ "= void" \
"print call_me (\"bonjour\")"
# Verify that the array was passed properly by checking the global
# variables that Call_Me sets as side-effects.
gdb_test "print first" \
- "98 'b'" \
+ "= 98 'b'" \
"print first after function call"
gdb_test "print last" \
- "114 'r'" \
+ "= 114 'r'" \
"print lasta after function call"
gdb_test "print length" \
- "7" \
+ "= 7" \
"print length after function call"
}
gdb_test "print string_p" \
- "\\(foo\\.string_access\\) 0x\[0-9a-zA-Z\]+" \
+ "= \\(foo\\.string_access\\) 0x\[0-9a-zA-Z\]+" \
"print string_p"
"Changing the language to ada"
gdb_test "print \$xxx := 1" \
- "1" \
+ "= 1" \
"set convenience variable \$xxx to 1"
"Changing the language to ada"
gdb_test "print 1 = 2" \
- "false" \
+ "= false" \
"print 1 = 2"
gdb_test "print 3 = 3" \
- "true" \
+ "= true" \
"print 3 = 3"
# the function call.
gdb_test "print procedure_result" \
- "32 ' '" \
+ "= 32 ' '" \
"print procedure_result before calling same"
gdb_test "call same (first)" \
"call same"
gdb_test "print procedure_result" \
- "97 'a'" \
+ "= 97 'a'" \
"print procedure_result after calling same"
gdb_test "call next (first)" \
- "98 'b'" \
+ "= 98 'b'" \
"call next"
gdb_test "print procedure_result" \
- "98 'b'" \
+ "= 98 'b'" \
"print procedure_result after calling next"
runto "p.adb:$bp_location"
gdb_test "print X ** Y = Z" \
- "true" \
+ "= true" \
"Long_Long_Integer ** Y"
gdb_test "print long_float'min (long_float (X), 8.0)" \
- "7.0" \
+ "= 7.0" \
"long_float'min"
gdb_test "print long_float'max (long_float (X), 8.0)" \
- "8.0" \
+ "= 8.0" \
"long_float'max"
runto "fixed.adb:$bp_location"
gdb_test "print My_Var > 10.0" \
- "true" \
+ "= true" \
"print My_Var > 10.0"
gdb_test "print My_Var > 20.0" \
- "false" \
+ "= false" \
"print My_Var > 20.0"
# Do the same, but with integer values.
gdb_test "print My_Var > 10" \
- "true" \
+ "= true" \
"print My_Var > 10"
gdb_test "print My_Var > 20" \
- "false" \
+ "= false" \
"print My_Var > 20"
runto "fixed_points.adb:$bp_location"
gdb_test "print base_object" \
- ".* = -50" \
+ "= -50" \
"p on a fixed point type"
gdb_test "print subtype_object" \
- ".* = -50" \
+ "= -50" \
"p on a subtype fixed point type"
gdb_test "print new_type_object" \
- ".* = -50" \
+ "= -50" \
"p on a new fixed point type"
# the inferior is *not* running (no frame).
gdb_test "print foo'address" \
- "0x\[0-9a-zA-Z\]+" \
+ "= .* 0x\[0-9a-zA-Z\]+" \
"print foo'address"
# class-wide.
gdb_test "p ident (ident (my_parameter))" \
- "\\(one => 1, two => 2, three => 3\\)" \
+ "= \\(one => 1, two => 2, three => 3\\)" \
"p ident (ident (my_parameter))"
"ptype lcl at BREAK_1"
gdb_test "print lcl" \
- "29" \
+ "= 29" \
"print lcl at BREAK_1"
# Now, continue until reaching BREAK_2, and do the same commands
"ptype lcl at BREAK_2"
gdb_test "print lcl" \
- "17" \
+ "= 17" \
"print lcl at BREAK_2"
runto "foo.adb:$bp_location"
gdb_test "print r" \
- "\\(x => 1, y => 2, w => 3, h => 4\\)" \
+ "= \\(x => 1, y => 2, w => 3, h => 4\\)" \
"print r"
gdb_test "print s" \
- "\\(x => 1, y => 2, w => 3, h => 4\\)" \
+ "= \\(x => 1, y => 2, w => 3, h => 4\\)" \
"print s"
runto "foo.adb:$bp_location"
gdb_test "print my_table" \
- "\\(\\)" \
+ "= \\(\\)" \
"print my_table"
gdb_test "ptype my_table" \
"ptype my_table"
gdb_test "print my_matrix" \
- "\\(m => \\((\"\", ){9}\"\"\\)\\)" \
+ "= \\(m => \\((\"\", ){9}\"\"\\)\\)" \
"print my_matrix"
runto "pa.adb:$bp_location"
gdb_test "print var" \
- ".* = \\(4 => true, false, true, false, true\\)" \
+ "= \\(4 => true, false, true, false, true\\)" \
"print var"
# Try printing the value and the type definition of a reference
"ptype &var"
gdb_test "print &var" \
- "\\(access array \\(\\.\\.\\.\\) of boolean\\) \\(4 => true, false, true, false, true\\)" \
+ "= \\(access array \\(\\.\\.\\.\\) of boolean\\) \\(4 => true, false, true, false, true\\)" \
"print &var"
runto "comp_bug.adb:$bp_location"
gdb_test "print x" \
- "\\(exists => true, value => 10\\)" \
+ "= \\(exists => true, value => 10\\)" \
"print x"
gdb_test "ptype x" \
gdb_test "print C" \
- "97 'a'" \
+ "= 97 'a'" \
"print C"
gdb_test "print WC" \
- "98 'b'" \
+ "= 98 'b'" \
"print WC"
gdb_test "print WWC" \
- "99 'c'" \
+ "= 99 'c'" \
"print WWC"
"start inferior"
gdb_test "p /x \$pc" \
- "0x\[0-9a-zA-Z\]+" \
+ "= 0x\[0-9a-zA-Z\]+" \
"p /x \$pc"
# Verify that we can compare a string slice with another string.
gdb_test "print String_Var (1 .. 3) = \"Hel\"" \
- "true" \
+ "= true" \
"print String_Var (1 .. 3) = \"Hel\""
gdb_test "print String_Var (1 .. 3) = \"hel\"" \
- "false" \
+ "= false" \
"print String_Var (1 .. 3) = \"hel\""
# Select the first choice from the multiple-choice menu above.
gdb_test "1" \
- "48" \
+ "= 48" \
"select first choice from multiple-choice menu"
}
gdb_test "print w.e.all" \
- "\\(month => 8, year => 1974\\)" \
+ "= \\(month => 8, year => 1974\\)" \
"print w.e.all"
"ptype segm"
gdb_test "print segm" \
- "\\(position => 74, width => 8\\)" \
+ "= \\(position => 74, width => 8\\)" \
"print segm"
# Now, test printing of an class-wide object.
"ptype obj"
gdb_test "print obj" \
- "\\(position => 74, width => 8\\)" \
+ "= \\(position => 74, width => 8\\)" \
"print obj"
runto "assign.adb:$bp_location"
gdb_test "p q" \
- "\\(2, 3, 5, 7, 11\\)" \
+ "= \\(2, 3, 5, 7, 11\\)" \
"p q"
gdb_test "set \$addr := q'address" \
"save q'address in convenience variable"
gdb_test "p {Integer} \$addr" \
- "2" \
+ "= 2" \
"print {Integer} \$addr"
# Now change the value at $addr using the same "{TYPE}" syntax.
"set {Integer} \$addr := 19"
gdb_test "p q" \
- "\\(19, 3, 5, 7, 11\\)" \
+ "= \\(19, 3, 5, 7, 11\\)" \
"p q"