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.
This commit is contained in:
parent
ec0a52e162
commit
1b28d0b3be
5 changed files with 52 additions and 6 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue