diff options
author | Tom Tromey <tromey@redhat.com> | 2010-05-21 21:00:27 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-05-21 21:00:27 +0000 |
commit | 74de6778b16fe5429d512d7250747f4d9e1ed374 (patch) | |
tree | 5f3c526668dca2b25e87cd5c0069781ea3528f0d /gdb/testsuite | |
parent | f346a30d48d166e2471126b8121a819ef39e3312 (diff) | |
download | gdb-74de6778b16fe5429d512d7250747f4d9e1ed374.zip gdb-74de6778b16fe5429d512d7250747f4d9e1ed374.tar.gz gdb-74de6778b16fe5429d512d7250747f4d9e1ed374.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/pieces.exp | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 304334d..87bec37 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 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.dwarf2.pieces.S: New file. * gdb.dwarf2.pieces.c: New file. diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp index bdac582..3515586 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces.exp +++ b/gdb/testsuite/gdb.dwarf2/pieces.exp @@ -54,4 +54,18 @@ proc pieces_test_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_f2 |