diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-16 18:07:58 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-16 18:07:58 +0000 |
commit | a0c78a733a3def605ce73c42e1610f676c7ac910 (patch) | |
tree | adc6f0f089338ff6650098112cb91082b1a17f69 /gdb/testsuite/gdb.trace/collection.exp | |
parent | 5ff2bd081f67d55a8a93f3945a8112336bae6d3c (diff) | |
download | binutils-gdb-a0c78a733a3def605ce73c42e1610f676c7ac910.tar.gz |
2011-02-16 Tom Tromey <tromey@redhat.com>
gdb/
* ax-gdb.c.c (gen_expr) <UNOP_MEMVAL>: Handle value kinds other
than axs_rvalue.
2011-02-16 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
* collection.c (globalarr3): New global.
(main): Initialize it before collecting, and and clear it
afterwards.
* collection.exp (gdb_collect_globals_test): Test collecting with
'{type} addr', where the addr expression is not an rvalue.
Diffstat (limited to 'gdb/testsuite/gdb.trace/collection.exp')
-rw-r--r-- | gdb/testsuite/gdb.trace/collection.exp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp index c966f2f129d..c6f7fd1e6f8 100644 --- a/gdb/testsuite/gdb.trace/collection.exp +++ b/gdb/testsuite/gdb.trace/collection.exp @@ -479,7 +479,8 @@ proc gdb_collect_globals_test { } { "collect globalc, globali, globalf, globald" "^$" \ "collect globalstruct, globalp, globalarr" "^$" \ "collect \{int \[4\]\}$globalarr2_addr" "^$" \ - "collect \{int \[2\]\}$globalarr2_addr" "^$" + "collect \{int \[2\]\}$globalarr2_addr" "^$" \ + "collect \{int \[4\]\}globalarr3" "^$" # Begin the test. run_trace_experiment "globals" globals_test_func @@ -530,6 +531,14 @@ proc gdb_collect_globals_test { } { "\\$\[0-9\]+ = \\{0, 1, 2, 3\\}$cr" \ "collect globals: collected global array 2" + # GDB would internal error collecting UNOP_MEMVAL's whose address + # expression wasn't an rvalue (that's regtested in the + # corresponding 'collect' action above). This just double checks + # we actually did collect what we wanted. + gdb_test "print globalarr3" \ + "\\$\[0-9\]+ = \\{3, 2, 1, 0\\}$cr" \ + "collect globals: collected global array 3" + gdb_test "tfind none" \ "#0 end .*" \ "collect globals: cease trace debugging" |