Re:Lensm, a Tool for Viewing Disassembly
by c7DJTLrn on Monday October 09, 2023 @04:48PM
(#37825305)
It would probably be worth mentioning that this is for Go in the title.
[ Parent
| on HN ]
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.
Re:Lensm, a Tool for Viewing Disassembly
by liamwire on Monday October 09, 2023 @07:30PM
(#37826769)
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.
Can it demangle non-Go identifiers?
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
by MobiusHorizons on Tuesday October 10, 2023 @01:25AM
(#37828781)
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.
Yeah I just tried it too.
It did disassemble it and showed jumps, but no source code.
It also didn't resolve calls to functions like printf.
Re:Lensm, a Tool for Viewing Disassembly
by egonelbre on Tuesday October 10, 2023 @11:35AM
(#37833458)
Yeah, at the moment, unfortunately only works for Go.
But implementing a different backend (e.g. llvm-symbolizer, objdump etc.) shouldn't be too difficult. The main things it needs to do are 1. list the decompilable symbols in the file, 2. disassemble and pull in the relevant source code.
The UI part doesn't care whether it's Go or not.