diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-14 11:34:31 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-14 11:34:31 +0000 |
commit | 1b28d0b3beda72343ea25f135f17746340cae89c (patch) | |
tree | a4e689f35a517e08423bd1cfc58366a4d3be68fc /gdb/testsuite/gdb.trace/unavailable.exp | |
parent | ec0a52e16206a31867fdcc5535c42baca7bf8967 (diff) | |
download | gdb-1b28d0b3beda72343ea25f135f17746340cae89c.zip gdb-1b28d0b3beda72343ea25f135f17746340cae89c.tar.gz gdb-1b28d0b3beda72343ea25f135f17746340cae89c.tar.bz2 |
gdb/testuite/
* gdb.trace/unavailable.cc (a, b, c): New globals.
(main): Set and clear them.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Collect
`a' and `c', and check that `b' isn't collected, although `a' and
`c' are.
gdb/
* tracepoint.c (memrange_sortmerge): Don't merge ranges that are
almost but not quite adjacent.
Diffstat (limited to 'gdb/testsuite/gdb.trace/unavailable.exp')
-rw-r--r-- | gdb/testsuite/gdb.trace/unavailable.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp index aa87cfb..8ec6343 100644 --- a/gdb/testsuite/gdb.trace/unavailable.exp +++ b/gdb/testsuite/gdb.trace/unavailable.exp @@ -92,6 +92,9 @@ proc gdb_collect_globals_test { } { "collect struct_b.struct_a.array\[2\]" "^$" \ "collect struct_b.struct_a.array\[100\]" "^$" \ \ + "collect a" "^$" \ + "collect c" "^$" \ + \ "collect tarray\[0\].a" "^$" \ "collect tarray\[1\].a" "^$" \ "collect tarray\[3\].a" "^$" \ @@ -145,6 +148,15 @@ proc gdb_collect_globals_test { } { gdb_test "print /x struct_b.struct_a.array\[2\]" " = 0xaaaaaaaa" + # Check the target doesn't overcollect. GDB used to merge memory + # ranges to collect if they were close enough (collecting the hole + # as well), but does not do that anymore. It's plausible that a + # target may do this on its end, but as of this writing, no known + # target does it. + gdb_test "print {a, b, c}" \ + " = \\{1, <unavailable>, 3\\}" \ + "No overcollect of almost but not quite adjacent memory ranges" + # Check <unavailable> isn't confused with 0 in array element repetitions gdb_test_no_output "set print repeat 1" |