diff options
| author | Mark Wielaard <[email protected]> | 2017-11-29 15:43:26 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2017-11-29 15:57:24 +0100 |
| commit | 704f5fc477efaf120980449e677deb563da8491f (patch) | |
| tree | eb5fcf5a32df412dbf66894ddc6305a9eba7c2ec /tests | |
| parent | 268a27211b152d876185ff95255e5025c43b9c13 (diff) | |
readelf: Adjust print_ops formatting.
Use only 2 spaces for index (there are never 10000, the most seen in the
wild is 64). Adjust re-indenting after GNU_entry_value.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 7 | ||||
| -rwxr-xr-x | tests/run-readelf-dwz-multi.sh | 32 | ||||
| -rwxr-xr-x | tests/run-readelf-loc.sh | 18 | ||||
| -rwxr-xr-x | tests/run-readelf-zdebug-rel.sh | 18 | ||||
| -rwxr-xr-x | tests/run-readelf-zdebug.sh | 30 |
5 files changed, 56 insertions, 49 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 01620343..9633cd13 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2017-11-29 Mark Wielaard <[email protected]> + + * run-readelf-dwz-multi.sh: Adjust expected ops index spaces. + * run-readelf-loc.sh: Likewise. + * run-readelf-zdebug-rel.sh: Likewise. + * run-readelf-zdebug.sh: Likewise. + 2017-11-16 Mark Wielaard <[email protected]> * varlocs.c (main): Fix cfi_debug => cfi_debug_bias typo in assert. diff --git a/tests/run-readelf-dwz-multi.sh b/tests/run-readelf-dwz-multi.sh index 23ca944c..139b8c1f 100755 --- a/tests/run-readelf-dwz-multi.sh +++ b/tests/run-readelf-dwz-multi.sh @@ -107,7 +107,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: low_pc (addr) 0x00000000004006ac <main> high_pc (udata) 44 (0x00000000004006d8) frame_base (exprloc) - [ 0] call_frame_cfa + [ 0] call_frame_cfa GNU_all_tail_call_sites (flag_present) yes sibling (ref_udata) [ 6e] [ 48] formal_parameter @@ -116,21 +116,21 @@ DWARF section [28] '.debug_info' at offset 0x1078: decl_line (data1) 3 type (GNU_ref_alt) [ 3e] location (exprloc) - [ 0] fbreg -36 + [ 0] fbreg -36 [ 56] formal_parameter name (strp) "argv" decl_file (data1) 1 decl_line (data1) 3 type (ref_udata) [ 6e] location (exprloc) - [ 0] fbreg -48 + [ 0] fbreg -48 [ 61] variable name (string) "b" decl_file (data1) 1 decl_line (data1) 5 type (GNU_ref_alt) [ 5a] location (exprloc) - [ 0] fbreg -32 + [ 0] fbreg -32 [ 6e] pointer_type byte_size (data1) 8 type (ref_udata) [ 2b] @@ -168,7 +168,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: low_pc (addr) 0x00000000004006ac <main> high_pc (udata) 44 (0x00000000004006d8) frame_base (exprloc) - [ 0] call_frame_cfa + [ 0] call_frame_cfa GNU_all_tail_call_sites (flag_present) yes sibling (ref_udata) [ 6e] [ 48] formal_parameter @@ -177,21 +177,21 @@ DWARF section [28] '.debug_info' at offset 0x1078: decl_line (data1) 3 type (GNU_ref_alt) [ 3e] location (exprloc) - [ 0] fbreg -36 + [ 0] fbreg -36 [ 56] formal_parameter name (strp) "argv" decl_file (data1) 1 decl_line (data1) 3 type (ref_udata) [ 6e] location (exprloc) - [ 0] fbreg -48 + [ 0] fbreg -48 [ 61] variable name (string) "b" decl_file (data1) 1 decl_line (data1) 5 type (GNU_ref_alt) [ 5a] location (exprloc) - [ 0] fbreg -32 + [ 0] fbreg -32 [ 6e] pointer_type byte_size (data1) 8 type (ref_udata) [ 2b] @@ -225,7 +225,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: low_pc (addr) +0x0000000000000670 <call_foo> high_pc (udata) 23 (+0x0000000000000687) frame_base (exprloc) - [ 0] call_frame_cfa + [ 0] call_frame_cfa GNU_all_call_sites (flag_present) yes [ 41] formal_parameter name (string) "fb" @@ -233,7 +233,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: decl_line (data1) 3 type (GNU_ref_alt) [ 76] location (exprloc) - [ 0] fbreg -24 + [ 0] fbreg -24 EOF # Same as above, but find alt debug file in a .dwz subdir. @@ -265,7 +265,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: low_pc (addr) +0x0000000000000670 <call_foo> high_pc (udata) 23 (+0x0000000000000687) frame_base (exprloc) - [ 0] call_frame_cfa + [ 0] call_frame_cfa GNU_all_call_sites (flag_present) yes [ 41] formal_parameter name (string) "fb" @@ -273,7 +273,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: decl_line (data1) 3 type (GNU_ref_alt) [ 76] location (exprloc) - [ 0] fbreg -24 + [ 0] fbreg -24 EOF mv .dwz/testfile_multi.dwz . rmdir .dwz @@ -304,7 +304,7 @@ DWARF section [28] '.debug_info' at offset 0x1088: low_pc (addr) 0x00000000004004ec <main> high_pc (udata) 18 (0x00000000004004fe) frame_base (exprloc) - [ 0] call_frame_cfa + [ 0] call_frame_cfa GNU_all_call_sites (flag_present) yes [ 41] formal_parameter name (GNU_strp_alt) "argc" @@ -312,21 +312,21 @@ DWARF section [28] '.debug_info' at offset 0x1088: decl_line (data1) 8 type (GNU_ref_alt) [ 30] location (exprloc) - [ 0] fbreg -36 + [ 0] fbreg -36 [ 4f] formal_parameter name (GNU_strp_alt) "argv" decl_file (data1) 1 decl_line (data1) 8 type (GNU_ref_alt) [ 41] location (exprloc) - [ 0] fbreg -48 + [ 0] fbreg -48 [ 5d] variable name (string) "fbb" decl_file (data1) 1 decl_line (data1) 10 type (GNU_ref_alt) [ 14] location (exprloc) - [ 0] fbreg -32 + [ 0] fbreg -32 EOF exit 0 diff --git a/tests/run-readelf-loc.sh b/tests/run-readelf-loc.sh index 98870fcf..3959d3d7 100755 --- a/tests/run-readelf-loc.sh +++ b/tests/run-readelf-loc.sh @@ -63,9 +63,9 @@ 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 + [ 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 DWARF section [34] '.debug_ranges' at offset 0xd94: [ 0] 0x0000000000400480 <main>..0x0000000000400482 <main+0x2> @@ -79,9 +79,9 @@ 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 + [ 0] 0x0000000000400480..0x000000000040048d [ 0] reg5 + [ 23] 0x0000000000400485..0x000000000040048d [ 0] reg5 + [ 46] 0x00000000004004b2..0x00000000004004ba [ 0] breg5 0 DWARF section [34] '.debug_ranges' at offset 0xd94: [ 0] 0x0000000000400480..0x0000000000400482 @@ -95,9 +95,9 @@ 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 + [ 0] 000000000000000000..0x000000000000000d [ 0] reg5 + [ 23] 0x0000000000000005..0x000000000000000d [ 0] reg5 + [ 46] 0x0000000000000012..0x000000000000001a [ 0] breg5 0 DWARF section [34] '.debug_ranges' at offset 0xd94: [ 0] 000000000000000000..0x0000000000000002 diff --git a/tests/run-readelf-zdebug-rel.sh b/tests/run-readelf-zdebug-rel.sh index 1232d63b..082971e0 100755 --- a/tests/run-readelf-zdebug-rel.sh +++ b/tests/run-readelf-zdebug-rel.sh @@ -69,7 +69,7 @@ DWARF section [ 4] '.debug_info' at offset 0x58: low_pc (addr) 000000000000000000 high_pc (data8) 24 (0x0000000000000018) frame_base (exprloc) - [ 0] call_frame_cfa + [ 0] call_frame_cfa GNU_all_call_sites (flag_present) yes sibling (ref4) [ 80] [ 4e] formal_parameter @@ -84,7 +84,7 @@ DWARF section [ 4] '.debug_info' at offset 0x58: decl_line (data1) 4 type (ref4) [ 87] location (exprloc) - [ 0] reg4 + [ 0] reg4 [ 6a] variable name (string) "a" decl_file (data1) 1 @@ -97,7 +97,7 @@ DWARF section [ 4] '.debug_info' at offset 0x58: decl_line (data1) 7 type (ref4) [ 9a] location (exprloc) - [ 0] reg5 + [ 0] reg5 [ 80] base_type byte_size (data1) 4 encoding (data1) signed (5) @@ -127,12 +127,12 @@ cat info.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=i cat > loc.out << \EOF DWARF section [ 7] '.debug_loc' at offset 0x185: - [ 0] 000000000000000000..0x0000000000000003 [ 0] reg5 - 0x0000000000000003..0x0000000000000010 [ 0] breg5 -42 - [ 2] stack_value - 0x0000000000000010..0x0000000000000018 [ 0] GNU_entry_value: - [ 0] reg5 - [ 3] stack_value + [ 0] 000000000000000000..0x0000000000000003 [ 0] reg5 + 0x0000000000000003..0x0000000000000010 [ 0] breg5 -42 + [ 2] stack_value + 0x0000000000000010..0x0000000000000018 [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value EOF cat loc.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug-rel.o diff --git a/tests/run-readelf-zdebug.sh b/tests/run-readelf-zdebug.sh index 37cf7eaa..fc666fd1 100755 --- a/tests/run-readelf-zdebug.sh +++ b/tests/run-readelf-zdebug.sh @@ -46,12 +46,12 @@ tempfiles loc.out aranges.out ranges.out macro.out line.out frame.out cat > loc.out << \EOF DWARF section [30] '.debug_loc' at offset 0xa17: - [ 0] 0x00000000004003c0..0x00000000004003c3 [ 0] reg5 - 0x00000000004003c3..0x00000000004003d6 [ 0] breg5 -42 - [ 2] stack_value - 0x00000000004003d6..0x00000000004003d9 [ 0] GNU_entry_value: - [ 0] reg5 - [ 3] stack_value + [ 0] 0x00000000004003c0..0x00000000004003c3 [ 0] reg5 + 0x00000000004003c3..0x00000000004003d6 [ 0] breg5 -42 + [ 2] stack_value + 0x00000000004003d6..0x00000000004003d9 [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value EOF cat loc.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug @@ -476,15 +476,15 @@ Call frame information section [16] '.eh_frame' at offset 0x5b8: def_cfa_offset 24 advance_loc 10 to 0x3b0 def_cfa_expression 11 - [ 0] breg7 8 - [ 2] breg16 0 - [ 4] lit15 - [ 5] and - [ 6] lit11 - [ 7] ge - [ 8] lit3 - [ 9] shl - [ 10] plus + [ 0] breg7 8 + [ 2] breg16 0 + [ 4] lit15 + [ 5] and + [ 6] lit11 + [ 7] ge + [ 8] lit3 + [ 9] shl + [10] plus nop nop nop |
