question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instruction Annotations

See original GitHub issue

This is an excellent tool! Though it seems that godbolt is geared more towards experts, it would be really great if it were possible to enable something that would show little annotations with each instruction. The annotations would explain in a few words what each instruction does in the compiled output.

I know assembly and have written some of it before, but I don’t know every instruction and often need to look things up. If I’m just trying to figure out a simple problem or look for something, it would make my life much easier if I could just look click a button and be reminded what every instruction does. It can be nice to have it explained plainly that mov x, y moves y to x. No need to remember which argument is the destination.

The explanations don’t have to be detailed, just a simple description of the instruction:

add     ecx, eax     ; add eax to ecx and store the result in ecx

alternatively:

add     ecx, eax     ; ecx = ecx + eax

This is a simple example, but imagine having this on all the instructions including the ones you don’t know off hand. In a larger program, this can be very beneficial. With this, there is no need to remember which register is the destination and what the order of the operands will be.

There are so many variations on instructions as well. Having this would save a lot of time looking up what each different one means.

Both experienced users and novices alike can benefit from this. It’ll make reading the generated asm a lot easier.

It can be something turned on/off with a button just like the other options already available. screenshot from 2017-04-05 16-29-59

Edit: The instruction descriptions do not need to be written by hand either. There are resources online that can be scraped and used to generate each one.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
RubenRBScommented, Apr 5, 2017

Ey @sunjay ! While this is not exactly what you describe, we’re in the process of implementing asm documentation, and while it’s not perfect yet (We don’t support every opcode yet, some descriptions could be parsed better… etc), you can try it now on the site. Simply place the mouse over the opcode and it will show you its basic description. Right clicking the opcode and pressing Show asm documentation will give you even more data, along with a link for even more!

While we’re going to bring more features to it over the course of the next weeks, you’re more than welcomed to give us your feedback after testing its current implementation.

1reaction
mattgodboltcommented, Apr 8, 2017

Might be able to do something in conjuction with e.g. https://github.com/StanfordPL/x64asm/blob/develop/src/x86.csv

Read more comments on GitHub >

github_iconTop Results From Across the Web

Teaching Student Annotation: Constructing Meaning Through ...
Overview. Students learn about the purposes and techniques of annotation by examining text closely and critically. They study sample annotations and identify ...
Read more >
Annotating Texts - UNC Learning Center
A systematic summary of the text that you create within the document; A key tool for close reading that helps you uncover patterns,...
Read more >
Annotation Instructions
As part of your summer reading assignment, you will annotate your text as you read. Annotating keeps the reader engaged with the text....
Read more >
Title: Annotating Text - Louisiana Believes
WHOLE-CLASS INSTRUCTIONAL STRATEGY. Title: Annotating Text. The Basics. What? Marking a text for main ideas, key details, meaning, and questions.
Read more >
7 Strategies for Teaching Students How to Annotate
One of the most effective ways to teach annotation is to show students your own thought process when annotating a text. Display a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found