-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Change dis output to display labels instead of offsets #112137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
More ideas:
For example:
For this code:
|
In theory a disassembler should produce "assembly code" that is a human writable form of the underlying (virtual) machine code. I don't think I would want to add those vertical bars by hand.
|
Since a label can appear as a jump target and in the exception table, maybe just use Also, do we want labels to the left or right of line numbers, and do we want them on their own lines or on the same line?
|
I have this now:
|
New version with labels not on their own line, and an option to include offsets:
|
I think it would be nice to have |
I still find it jarring to see the labels to the left of the line numbers. I'm so used to line numbers being the leftmost piece of information in any presentation where they are relevant. I think this would also make it easier to guess the difference between the two numbers (line and offset). Finally. Is it time to switch to instruction indices, from byte offsets? This would halve the numbers, and make it easier to correlate them to things actually found in variables or other debug output (e.g. lltrace). |
You mean code unit offsets, not instruction offsets? |
Perhaps we should make the default what we have now (for backwards compatibility, not because it is the best or prettiest) and allow the user to choose the format. For example, Or is that just getting too complicated? |
I think it would be more pleasing visually in the output. |
New version is:
|
With
|
Unsurprisingly I like the version best with '--' for unknown line numbers, labels, byte (or instr!) offsets. In fact I can't wait to use it. :-) |
TODO:
--
instead ofNone
for missing line number? - in another PR.Feature or enhancement
This is easier to read than the current output of:
Linked PRs
The text was updated successfully, but these errors were encountered: