Skip to content

readelf: Always add one blank between columns#658

Merged
eliben merged 1 commit into
eliben:mainfrom
pmhahn:fix-readelf-dump-frames-interp-columns
May 26, 2026
Merged

readelf: Always add one blank between columns#658
eliben merged 1 commit into
eliben:mainfrom
pmhahn:fix-readelf-dump-frames-interp-columns

Conversation

@pmhahn

@pmhahn pmhahn commented May 26, 2026

Copy link
Copy Markdown
Contributor

While converting test tests to use pytest I stumbled over one difference, where readelf.py does not print at least one column separator:

$ test/external_tools/readelf --debug-dump=frames-interp test/testfiles_for_dwarfdump/dwarf_v5ops.so.elf | grep 2d335
000000000002d335 rsp+10256 c-56  c-48  c-40  c-32  c-24  c-16  c-8
                          ^
$ scripts/readelf.py --debug-dump=frames-interp test/testfiles_for_dwarfdump/dwarf_v5ops.so.elf | grep 2d335 #broken
000000000002d335 rsp+10256c-56  c-48  c-40  c-32  c-24  c-16  c-8
                         ^^
$ scripts/readelf.py --debug-dump=frames-interp test/testfiles_for_dwarfdump/dwarf_v5ops.so.elf | grep 2d335 #fixed
000000000002d335 rsp+10256 c-56  c-48  c-40  c-32  c-24  c-16  c-8
                          ^

Insert at least one blank between each column; reduce the following column width by one character.

$ test/external_tools/readelf --debug-dump=frames-interp test/testfiles_for_dwarfdump/dwarf_v5ops.so.elf | grep 2d335
000000000002d335 rsp+10256 c-56  c-48  c-40  c-32  c-24  c-16  c-8
                          ^
$ scripts/readelf.py --debug-dump=frames-interp test/testfiles_for_dwarfdump/dwarf_v5ops.so.elf | grep 2d335  # broken
000000000002d335 rsp+10256c-56  c-48  c-40  c-32  c-24  c-16  c-8
                         ^^
$ scripts/readelf.py --debug-dump=frames-interp test/testfiles_for_dwarfdump/dwarf_v5ops.so.elf | grep 2d335  # fixed
000000000002d335 rsp+10256 c-56  c-48  c-40  c-32  c-24  c-16  c-8
                          ^

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
@eliben
eliben merged commit 83c6957 into eliben:main May 26, 2026
5 checks passed
@pmhahn
pmhahn deleted the fix-readelf-dump-frames-interp-columns branch May 26, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants