This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: aranges
- From: Roland McGrath <roland at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 27 Jan 2009 15:54:18 -0800
- Subject: Re: aranges
> What anomalies did you see? I ask because one of the archer patches
> changes gdb to use aranges. If this information isn't reliable, we
> should either fix it or not merge this patch.
Not really investigating it myself. Like I said, back seat to our critical
path. That path includes producing tools to help you investigate.
Using the dwarfcmp.cc patch I posted before, I did:
./run.sh src/dwarfcmp src/dwarfcmp src/dwarfcmp | sed 's/[<>,]/\n/g' | sed '/^$/q' > rr
sed '/vs/q' rr > a; sed -n '/vs/,$p' rr > b
diff -u a b
(dwarfcmp itself is the example data file too.) Results below (this just
picks the first CU in the output).
Feel free to write (and post!) a hack to test this directly and display the
results more helpfully. That code can eventually go into dwarflint's
semantic checks. It's easy enough to do with the ranges/aranges iterators
and std::mismatch and such. If you produce a self-contained frob for it,
I'll be glad to throw it at the debuginfo test archive and give you the
full results. (See past postings about debuginfo-test-scripts. Make a
simple tool/script that takes one file name and produces no output if there
is nothing to report.)
This case shows two kinds: overlaps among ranges in the aranges set,
and the aranges set missing some ranges from the DW_AT_ranges set.
Off hand, these may be more or less harmless. That is, overlaps are
harmless as long as they don't confuse your searching, since the multiple
overlapping ranges all point you to the same CU. Sins of omission in
aranges are harmless inasmuch as they won't lead you astray. If you
consider the aranges only an optimized lookup for positive matches rather
than definitive for negative matches, then fall back to searching all CUs
for an unknown address, you won't lose out.
But I leave the actual investigation to you.
Thanks,
Roland
===========================
--- a 2009-01-27 15:35:54.000000000 -0800
+++ b 2009-01-27 15:35:54.000000000 -0800
@@ -1,4 +1,4 @@
-mismatch aranges
+ vs CU-ranges
0x40296c-0x404128
0x404128-0x40413d
0x40413d-0x40414f
@@ -73,6 +73,7 @@
0x404bf2-0x404c00
0x404c00-0x404c35
0x404c36-0x404c63
+0x40296c-0x4029c5
0x404c64-0x404c83
0x404c84-0x404ca3
0x404ca4-0x404ce1
@@ -425,11 +426,15 @@
0x407b14-0x407b50
0x407b50-0x407b5e
0x407b5e-0x407b9a
+0x4029c5-0x402a02
+0x402a02-0x402a17
0x407b9a-0x407bbb
0x407bbc-0x407bfc
0x407bfc-0x407c2f
0x407c30-0x407c50
0x407c50-0x407c75
+0x402a17-0x402af4
+0x402af4-0x402b73
0x407c75-0x407d96
0x407d96-0x407db2
0x407db2-0x407e4c
@@ -707,6 +712,7 @@
0x40fc7e-0x40fce7
0x40fce8-0x40fd25
0x40fd26-0x40fd48
+0x402b73-0x402bc2
0x40fd48-0x40fdd6
0x40fdd6-0x40fe1b
0x40fe1c-0x40fe9a
@@ -734,4 +740,12 @@
0x410b90-0x410ce0
0x410ce0-0x410d07
0x410d08-0x410dd1
- vs CU-ranges
+0x402bc2-0x402ccd
+0x402ccd-0x402ec5
+0x402ec5-0x403090
+0x403090-0x4033aa
+0x4033aa-0x4033d1
+0x4033d1-0x4035c3
+0x4035c3-0x4036bd
+0x4036bd-0x404128
+