Live data from Hacker News

Lensm, a tool for viewing disassembly

storj.io

1–10 of 19 posts

Re: Lensm, a tool for viewing disassembly

#2
Wow, having to stare at disassembly too often, I really like this.

Makes it much faster to follow branches and can easily see what instructions correspond to source code lines, even though it's not very exact at higher optimization levels.

This should be integrated in all IDEs.

Re: Lensm, a tool for viewing disassembly

#4
post #2

Wow, having to stare at disassembly too often, I really like this. Makes it much faster to follow branches and can easily see what instructions correspond to source code lines, even though it's not very exact at higher optimization levels. This should be integrated in all IDEs.

With recent versions of GNU objdump, you can use --source --visualize-jumps=color and perhaps also --reloc or --dynamic-reloc for a similar experience with the native toolchain. (Unfortunately, -S/--source absolutely sucks for executables compiled at -O2.)

Other tricks include --no-addresses --no-show-raw-insn, which make the disassembly decently diffable.

Re: Lensm, a tool for viewing disassembly

#6
post #2

Wow, having to stare at disassembly too often, I really like this. Makes it much faster to follow branches and can easily see what instructions correspond to source code lines, even though it's not very exact at higher optimization levels. This should be integrated in all IDEs.

With recent versions of GNU objdump, you can use --source --visualize-jumps=color and perhaps also --reloc or --dynamic-reloc for a similar experience with the native toolchain. (Unfortunately, -S/--source absolutely sucks for executables compiled at -O2.) Other tricks include --no-addresses --no-show-raw-insn, which make the disassembly decently diffable.

Nice. Thanks for the tip

Re: Lensm, a tool for viewing disassembly

#7
post #5
post #3

It would probably be worth mentioning that this is for Go in the title.

I'd imagine it would work for any binary with debug symbols, even though the tool is written in go? Though I haven't tried it, on mobile right now.

I’m not so sure. From the article, the author mentions that they’re using an internal library from the Go compiler for the disassembly.

Re: Lensm, a tool for viewing disassembly

#8
post #5
post #3

It would probably be worth mentioning that this is for Go in the title.

I'd imagine it would work for any binary with debug symbols, even though the tool is written in go? Though I haven't tried it, on mobile right now.

Can it demangle non-Go identifiers?

Re: Lensm, a tool for viewing disassembly

#9
post #5
post #3

It would probably be worth mentioning that this is for Go in the title.

I'd imagine it would work for any binary with debug symbols, even though the tool is written in go? Though I haven't tried it, on mobile right now.

I tried it with C and it does not work. So I guess it is go-specific indeed.

Re: Lensm, a tool for viewing disassembly

#10
post #9
post #5

Earlier quoted context omitted.

I'd imagine it would work for any binary with debug symbols, even though the tool is written in go? Though I haven't tried it, on mobile right now.

I tried it with C and it does not work. So I guess it is go-specific indeed.

Did you have debug symbols? I assume you probably passed -g, but the debug info can still not be compatible sometimes. I know when using lldb I sometimes have to force dwarf debug info or -ggdb to get it working.
Post reply on HN