gdb
* eval.c (evaluate_subexp_standard) <BINOP_SUBSCRIPT>: Call evaluate_subexp, not evaluate_subexp_with_coercion. gdb/testsuite * gdb.dwarf2/pieces.exp (pieces_test_f2): New proc. Call it.
This commit is contained in:
parent
f346a30d48
commit
74de6778b1
4 changed files with 26 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2010-05-21 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
|
||||||
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
|
* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
|
||||||
|
|
|
@ -2059,8 +2059,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
error (_("':' operator used in invalid context"));
|
error (_("':' operator used in invalid context"));
|
||||||
|
|
||||||
case BINOP_SUBSCRIPT:
|
case BINOP_SUBSCRIPT:
|
||||||
arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
|
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||||
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||||
if (noside == EVAL_SKIP)
|
if (noside == EVAL_SKIP)
|
||||||
goto nosideret;
|
goto nosideret;
|
||||||
if (binop_user_defined_p (op, arg1, arg2))
|
if (binop_user_defined_p (op, arg1, arg2))
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2010-05-21 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.dwarf2.pieces.exp: New file.
|
* gdb.dwarf2.pieces.exp: New file.
|
||||||
|
|
|
@ -54,4 +54,18 @@ proc pieces_test_f1 {} {
|
||||||
gdb_test "print a.j" " = 14" "print a.j in pieces:f1"
|
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_f1
|
||||||
|
pieces_test_f2
|
||||||
|
|
Loading…
Add table
Reference in a new issue