aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-02-14 11:34:31 +0000
committerPedro Alves <palves@redhat.com>2011-02-14 11:34:31 +0000
commit1b28d0b3beda72343ea25f135f17746340cae89c (patch)
treea4e689f35a517e08423bd1cfc58366a4d3be68fc /gdb/tracepoint.c
parentec0a52e16206a31867fdcc5535c42baca7bf8967 (diff)
downloadgdb-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/tracepoint.c')
-rw-r--r--gdb/tracepoint.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 498f47c..3eae937 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -841,13 +841,12 @@ memrange_sortmerge (struct collection_list *memranges)
{
for (a = 0, b = 1; b < memranges->next_memrange; b++)
{
- if (memranges->list[a].type == memranges->list[b].type &&
- memranges->list[b].start - memranges->list[a].end <=
- MAX_REGISTER_SIZE)
+ /* If memrange b overlaps or is adjacent to memrange a,
+ merge them. */
+ if (memranges->list[a].type == memranges->list[b].type
+ && memranges->list[b].start <= memranges->list[a].end)
{
- /* memrange b starts before memrange a ends; merge them. */
- if (memranges->list[b].end > memranges->list[a].end)
- memranges->list[a].end = memranges->list[b].end;
+ memranges->list[a].end = memranges->list[b].end;
continue; /* next b, same a */
}
a++; /* next a */