diff options
| author | Mark Wielaard <[email protected]> | 2017-11-29 16:06:36 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2017-11-29 16:45:18 +0100 |
| commit | d5b99ee3b4a2fd0ca989fe42f3ab6b3ac328a414 (patch) | |
| tree | 77d3b436a014acb5215dacd0eef6443078636092 /tests | |
| parent | e6f1990baf57f07960d10bfed306ed74f93f491a (diff) | |
readelf: Print actual file for decl_file and call_file attributes.
When we see a DW_AT_decl_file or DW_AT_call_file attribute print the
actual file name. The current interface gives us a full (absolute) patch,
but we only want to show the file name for now to not clutter the output
too much. This helps a lot when trying to determine where something was
declared if you are just looking at the DIE tree. Otherwise you'll have
to cross match the number by hand with the corresponding line table entry.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 5 | ||||
| -rwxr-xr-x | tests/run-readelf-dwz-multi.sh | 32 | ||||
| -rwxr-xr-x | tests/run-readelf-zdebug-rel.sh | 10 |
3 files changed, 26 insertions, 21 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index f522a69e..c9fc53ab 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,10 @@ 2017-11-29 Mark Wielaard <[email protected]> + * run-readelf-dwz-multi.sh: Add expected file names. + * run-readelf-zdebug-rel.sh: Likewise. + +2017-11-29 Mark Wielaard <[email protected]> + * run-readelf-dwz-multi.sh: Add expected abbrev codes. * run-readelf-zdebug-rel.sh: Likewise. diff --git a/tests/run-readelf-dwz-multi.sh b/tests/run-readelf-dwz-multi.sh index 21456fdf..4f317ac9 100755 --- a/tests/run-readelf-dwz-multi.sh +++ b/tests/run-readelf-dwz-multi.sh @@ -100,7 +100,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: [ 31] subprogram abbrev: 3 external (flag_present) yes name (strp) "main" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] @@ -112,21 +112,21 @@ DWARF section [28] '.debug_info' at offset 0x1078: sibling (ref_udata) [ 6e] [ 48] formal_parameter abbrev: 8 name (strp) "argc" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 3e] location (exprloc) [ 0] fbreg -36 [ 56] formal_parameter abbrev: 4 name (strp) "argv" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (ref_udata) [ 6e] location (exprloc) [ 0] fbreg -48 [ 61] variable abbrev: 7 name (string) "b" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 5 type (GNU_ref_alt) [ 5a] location (exprloc) @@ -161,7 +161,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: [ 31] subprogram abbrev: 3 external (flag_present) yes name (strp) "main" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] @@ -173,21 +173,21 @@ DWARF section [28] '.debug_info' at offset 0x1078: sibling (ref_udata) [ 6e] [ 48] formal_parameter abbrev: 8 name (strp) "argc" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 3e] location (exprloc) [ 0] fbreg -36 [ 56] formal_parameter abbrev: 4 name (strp) "argv" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (ref_udata) [ 6e] location (exprloc) [ 0] fbreg -48 [ 61] variable abbrev: 7 name (string) "b" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 5 type (GNU_ref_alt) [ 5a] location (exprloc) @@ -218,7 +218,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: [ 2b] subprogram abbrev: 1 external (flag_present) yes name (strp) "call_foo" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] @@ -229,7 +229,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: GNU_all_call_sites (flag_present) yes [ 41] formal_parameter abbrev: 4 name (string) "fb" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 76] location (exprloc) @@ -258,7 +258,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: [ 2b] subprogram abbrev: 1 external (flag_present) yes name (strp) "call_foo" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] @@ -269,7 +269,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: GNU_all_call_sites (flag_present) yes [ 41] formal_parameter abbrev: 4 name (string) "fb" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 76] location (exprloc) @@ -297,7 +297,7 @@ DWARF section [28] '.debug_info' at offset 0x1088: [ 2b] subprogram abbrev: 4 external (flag_present) yes name (GNU_strp_alt) "main" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 8 prototyped (flag_present) yes type (GNU_ref_alt) [ 30] @@ -308,21 +308,21 @@ DWARF section [28] '.debug_info' at offset 0x1088: GNU_all_call_sites (flag_present) yes [ 41] formal_parameter abbrev: 1 name (GNU_strp_alt) "argc" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 8 type (GNU_ref_alt) [ 30] location (exprloc) [ 0] fbreg -36 [ 4f] formal_parameter abbrev: 1 name (GNU_strp_alt) "argv" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 8 type (GNU_ref_alt) [ 41] location (exprloc) [ 0] fbreg -48 [ 5d] variable abbrev: 3 name (string) "fbb" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 10 type (GNU_ref_alt) [ 14] location (exprloc) diff --git a/tests/run-readelf-zdebug-rel.sh b/tests/run-readelf-zdebug-rel.sh index 93201aee..2b57d058 100755 --- a/tests/run-readelf-zdebug-rel.sh +++ b/tests/run-readelf-zdebug-rel.sh @@ -62,7 +62,7 @@ DWARF section [ 4] '.debug_info' at offset 0x58: [ 2d] subprogram abbrev: 2 external (flag_present) yes name (strp) "main" - decl_file (data1) 1 + decl_file (data1) testfile-zdebug-rel.c (1) decl_line (data1) 4 prototyped (flag_present) yes type (ref4) [ 80] @@ -74,26 +74,26 @@ DWARF section [ 4] '.debug_info' at offset 0x58: sibling (ref4) [ 80] [ 4e] formal_parameter abbrev: 3 name (strp) "argc" - decl_file (data1) 1 + decl_file (data1) testfile-zdebug-rel.c (1) decl_line (data1) 4 type (ref4) [ 80] location (sec_offset) location list [ 0] [ 5d] formal_parameter abbrev: 4 name (strp) "argv" - decl_file (data1) 1 + decl_file (data1) testfile-zdebug-rel.c (1) decl_line (data1) 4 type (ref4) [ 87] location (exprloc) [ 0] reg4 [ 6a] variable abbrev: 5 name (string) "a" - decl_file (data1) 1 + decl_file (data1) testfile-zdebug-rel.c (1) decl_line (data1) 6 type (ref4) [ 9a] const_value (sdata) -9 [ 74] variable abbrev: 6 name (string) "b" - decl_file (data1) 1 + decl_file (data1) testfile-zdebug-rel.c (1) decl_line (data1) 7 type (ref4) [ 9a] location (exprloc) |
