+2010-05-21 Tom Tromey <tromey@redhat.com>
+
+ * eval.c (evaluate_subexp_standard) <BINOP_SUBSCRIPT>: Call
+ evaluate_subexp, not evaluate_subexp_with_coercion.
+
2010-05-21 Pierre Muller <muller@ics.u-strasbg.fr>
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
error (_("':' operator used in invalid context"));
case BINOP_SUBSCRIPT:
- arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
- arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
+ arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
if (binop_user_defined_p (op, arg1, arg2))
+2010-05-21 Tom Tromey <tromey@redhat.com>
+
+ * gdb.dwarf2/pieces.exp (pieces_test_f2): New proc.
+ Call it.
+
2010-05-21 Tom Tromey <tromey@redhat.com>
* gdb.dwarf2.pieces.exp: New file.
gdb_test "print a.j" " = 14" "print a.j in pieces:f1"
}
+# Function f2 tests for a bug when indexing into an array created
+# using DW_OP_piece.
+proc pieces_test_f2 {} {
+ global csrcfile
+ set line [gdb_get_line_number "f2 breakpoint" $csrcfile]
+ gdb_test "break pieces.c:$line" "Breakpoint 3.*" \
+ "set f2 breakpoint for pieces"
+ gdb_continue_to_breakpoint "continue to f2 breakpoint for pieces"
+ gdb_test "print a" " = .4, 14." "print a in pieces:f2"
+ gdb_test "print a\[0\]" " = 4" "print a\[0\] in pieces:f2"
+ gdb_test "print a\[1\]" " = 14" "print a\[1\] in pieces:f2"
+}
+
pieces_test_f1
+pieces_test_f2