Bug 30216 - readelf "decodedline" output is illegible at 80 columns
Summary: readelf "decodedline" output is illegible at 80 columns
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-09 16:53 UTC by Tom Tromey
Modified: 2023-03-14 12:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
"bad" screenshot (41.76 KB, image/png)
2023-03-13 21:13 UTC, Tom Tromey
Details
good screenshot (46.65 KB, image/png)
2023-03-13 21:14 UTC, Tom Tromey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2023-03-09 16:53:34 UTC
With an 80-column terminal, the output of "readelf --debug-dump=decodedline"
is illegible.

One way to fix it would be to stagger the columns.
Another way might be to make the filename column narrower.

Experimentally, the output is legible at 84 columns, so maybe
just trimming a tiny bit off the filename would be enough.
Comment 1 Nick Clifton 2023-03-13 14:39:34 UTC
Hi Tom,

(In reply to Tom Tromey from comment #0)
> With an 80-column terminal, the output of "readelf --debug-dump=decodedline"
> is illegible.

Err, can you provide an example of what you mean ?

My, admittedly quick, testing seemed to show that the output was fine...

Cheers
  Nick
Comment 2 Tom Tromey 2023-03-13 21:13:47 UTC
Created attachment 14744 [details]
"bad" screenshot

Here's the bad one.  Note how Stmt is on the next line.
This may not look too bad until you see what the good one looks like.
Comment 3 Tom Tromey 2023-03-13 21:14:31 UTC
Created attachment 14745 [details]
good screenshot

If I make the terminal slightly wider, it looks a lot better.
I think it would be nicer to make it look like this at 80 columns.
Comment 4 Sourceware Commits 2023-03-14 12:23:22 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7506fc9bf1fef7904a213c89a2df915e652ed3b9

commit 7506fc9bf1fef7904a213c89a2df915e652ed3b9
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Mar 14 12:21:13 2023 +0000

    Adjust the decoded line output to fit into 80 columns.
    
      PR 30216
      * dwarf.c (display_debug_lines_decoded): Reduce space for filenames.
      * testsuite/binutils-all/dw5.W: Adjust expected output.
      * testsuite/binutils-all/objdump.WL: Adjust expected output.
Comment 5 Nick Clifton 2023-03-14 12:24:24 UTC
Hi Tom,

  Thanks - I understand now.  I think that reducing the space for the filenames should work best, so that is what I have done.

Cheers
  Nick