summaryrefslogtreecommitdiff
path: root/tests/run-readelf-loc.sh
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2017-11-29 16:37:50 +0100
committerMark Wielaard <mark@klomp.org>2017-11-29 16:47:26 +0100
commitfbb6c932e3ff74d4fb8bc54b72d9c9bdc4513f69 (patch)
tree4f2d5422a9762e892e1e84f65bd05bce316691e9 /tests/run-readelf-loc.sh
parent36eabdb739b16b934afe318c786a97c94b47bbf6 (diff)
downloadelfutils-fbb6c932e3ff74d4fb8bc54b72d9c9bdc4513f69.tar.gz
readelf: Print CU, base address and unresolved .debug_loc entries.
Also adjust the formatting for the resolved addresses to print them on separate lines so they nicely line up even when the addresses are resolved to symbol+offset names. And print the operands starting on a new line. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'tests/run-readelf-loc.sh')
-rwxr-xr-xtests/run-readelf-loc.sh51
1 files changed, 42 insertions, 9 deletions
diff --git a/tests/run-readelf-loc.sh b/tests/run-readelf-loc.sh
index 4b666cfe..e5152df8 100755
--- a/tests/run-readelf-loc.sh
+++ b/tests/run-readelf-loc.sh
@@ -63,9 +63,22 @@ testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc --debug-dump=ra
testfileloc<<\EOF
DWARF section [33] '.debug_loc' at offset 0xd2a:
- [ 0] 0x0000000000400480 <main>..0x000000000040048d <main+0xd> [ 0] reg5
- [ 23] 0x0000000000400485 <main+0x5>..0x000000000040048d <main+0xd> [ 0] reg5
- [ 46] 0x00000000004004b2 <say+0x12>..0x00000000004004ba <say+0x1a> [ 0] breg5 0
+
+ CU [ b] base: 0x0000000000400480 <main>
+ [ 0] range 0, d
+ 0x0000000000400480 <main>..
+ 0x000000000040048c <main+0xc>
+ [ 0] reg5
+ [ 23] range 5, d
+ 0x0000000000400485 <main+0x5>..
+ 0x000000000040048c <main+0xc>
+ [ 0] reg5
+
+ CU [ e0] base: 0x00000000004004a0 <say>
+ [ 46] range 12, 1a
+ 0x00000000004004b2 <say+0x12>..
+ 0x00000000004004b9 <say+0x19>
+ [ 0] breg5 0
DWARF section [34] '.debug_ranges' at offset 0xd94:
@@ -91,9 +104,22 @@ testrun_compare ${abs_top_builddir}/src/readelf -N --debug-dump=loc --debug-dump
testfileloc<<\EOF
DWARF section [33] '.debug_loc' at offset 0xd2a:
- [ 0] 0x0000000000400480..0x000000000040048d [ 0] reg5
- [ 23] 0x0000000000400485..0x000000000040048d [ 0] reg5
- [ 46] 0x00000000004004b2..0x00000000004004ba [ 0] breg5 0
+
+ CU [ b] base: 0x0000000000400480
+ [ 0] range 0, d
+ 0x0000000000400480..
+ 0x000000000040048c
+ [ 0] reg5
+ [ 23] range 5, d
+ 0x0000000000400485..
+ 0x000000000040048c
+ [ 0] reg5
+
+ CU [ e0] base: 0x00000000004004a0
+ [ 46] range 12, 1a
+ 0x00000000004004b2..
+ 0x00000000004004b9
+ [ 0] breg5 0
DWARF section [34] '.debug_ranges' at offset 0xd94:
@@ -119,9 +145,16 @@ testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc --debug-dump
testfileloc<<\EOF
DWARF section [33] '.debug_loc' at offset 0xd2a:
- [ 0] 000000000000000000..0x000000000000000d [ 0] reg5
- [ 23] 0x0000000000000005..0x000000000000000d [ 0] reg5
- [ 46] 0x0000000000000012..0x000000000000001a [ 0] breg5 0
+
+ CU [ b] base: 0x0000000000400480
+ [ 0] range 0, d
+ [ 0] reg5
+ [ 23] range 5, d
+ [ 0] reg5
+
+ CU [ e0] base: 0x00000000004004a0
+ [ 46] range 12, 1a
+ [ 0] breg5 0
DWARF section [34] '.debug_ranges' at offset 0xd94: