Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-09-24 19:36:57 +0000
committerEugene Tarassov2014-09-24 19:36:57 +0000
commit4c2de6fff2d4262f02001a374273dd0e9c57c6da (patch)
tree9aacbe2dc8db35c15407b31ee603c0a5b8641408
parentf9b5a5162d84dee84c2878948aeecb5f1c0d748a (diff)
downloadorg.eclipse.tcf.agent-4c2de6fff2d4262f02001a374273dd0e9c57c6da.tar.gz
org.eclipse.tcf.agent-4c2de6fff2d4262f02001a374273dd0e9c57c6da.tar.xz
org.eclipse.tcf.agent-4c2de6fff2d4262f02001a374273dd0e9c57c6da.zip
TCF Tests: better reporting of overlapping address ranges
-rw-r--r--tests/test-dwarf/tcf/backend/backend.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/test-dwarf/tcf/backend/backend.c b/tests/test-dwarf/tcf/backend/backend.c
index f3602faa..ebf13d35 100644
--- a/tests/test-dwarf/tcf/backend/backend.c
+++ b/tests/test-dwarf/tcf/backend/backend.c
@@ -1172,7 +1172,7 @@ static void test_public_names(void) {
loc_var_func(NULL, sym1);
}
}
- if ((n % 1000) == 0) tmp_gc();
+ if ((n % 100) == 0) tmp_gc();
}
for (m = 1; m < elf_file->section_cnt; m++) {
ELF_Section * tbl = elf_file->sections + m;
@@ -1200,20 +1200,25 @@ static void test_public_names(void) {
}
static void check_addr_ranges(void) {
- unsigned i;
DWARFCache * cache = get_dwarf_cache(get_dwarf_file(elf_file));
if (cache->mAddrRangesCnt > 1) {
+ unsigned i;
+ unsigned n = 0;
for (i = 0; i < cache->mAddrRangesCnt - 1; i++) {
UnitAddressRange * x = cache->mAddrRanges + i;
UnitAddressRange * y = cache->mAddrRanges + i + 1;
if (x->mSection == y->mSection &&
x->mAddr < y->mAddr + y->mSize &&
y->mAddr < x->mAddr + x->mSize) {
- printf("Overlapping address ranges: %08x %08x, %08x %08x\n",
- (unsigned)x->mAddr, (unsigned)x->mSize,
- (unsigned)y->mAddr, (unsigned)y->mSize);
+ if (n < 20) {
+ printf("Overlapping address ranges: %08x %08x, %08x %08x\n",
+ (unsigned)x->mAddr, (unsigned)x->mSize,
+ (unsigned)y->mAddr, (unsigned)y->mSize);
+ }
+ n++;
}
}
+ if (n >= 20) printf("Overlapping address ranges: total %d ranges ...\n", n);
}
}

Back to the top