diff options
author | Pedro Alves <pedro@codesourcery.com> | 2011-02-14 11:34:31 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2011-02-14 11:34:31 +0000 |
commit | 999294cfd150f1ed4393d349027f76ca77791761 (patch) | |
tree | c05de68111bc332ed9ad095ec08699a336461106 /gdb/tracepoint.c | |
parent | 2c53f3057e87a0683610f93ca295c4149ce0f589 (diff) | |
download | gdb-999294cfd150f1ed4393d349027f76ca77791761.tar.gz |
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.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 498f47c12d8..3eae9376bd0 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 */ |