MCPcopy
hub / github.com/loov/lensm

github.com/loov/lensm @v0.0.3 sqlite

repository ↗ · DeepWiki ↗ · release v0.0.3 ↗
635 symbols 1,297 edges 89 files 259 documented · 41%
README

lensm

A tool for viewing assembly and source.

Screenshot

Install with the usual Go commands:

go install loov.dev/lensm@main

For Linux you may need to add some additional dependencies. You can use go install --tags nowayland loov.dev/lensm@main or go install --tags nox11 loov.dev/lensm@main respectively to skip building Wayland or X11 version.

To run the program provide a regular expression filter for the function you want to inspect. -watch allows to automatically reload the executable and information when it changes.

lensm -watch -filter Fibonacci lensm

Note: The program requires a binary that is built on your computer, otherwise the source code for the functions cannot be loaded.

Why?

I wrote a blog post at https://www.storj.io/blog/lensm on why and how the core functionality works.

Extension points exported contracts — how you extend this code

RelocStringer (Interface)
(no doc) [7 implementers]
internal/go/src/objfile/objfile.go
File (Interface)
File represents an object file, a module or anything that contains functions. [1 implementers]
internal/disasm/file.go
FilterListItem (Interface)
(no doc) [2 implementers]
filterlist.go
DebugSSA (FuncType)
A DebugSSA function is called to set a -d ssa/... option. If nil, those options are reported as invalid options. If Debu
internal/go/src/objabi/flag.go
Func (Interface)
(no doc) [1 implementers]
internal/disasm/file.go
Liner (Interface)
(no doc) [1 implementers]
internal/go/src/objfile/disasm.go

Core symbols most depended-on inside this repo

Uint32
called by 33
internal/go/src/goobj/objfile.go
Read
called by 25
internal/go/src/goobj/objfile.go
Line
called by 18
internal/go/src/src/pos.go
Section
called by 16
internal/go/src/xcoff/file.go
uint32At
called by 16
internal/go/src/goobj/objfile.go
Add
called by 15
internal/disasm/lineset.go
Data
called by 13
internal/go/src/xcoff/file.go
Close
called by 12
internal/disasm/file.go

Shape

Method 368
Function 133
Struct 104
TypeAlias 21
Interface 6
FuncType 3

Languages

Go100%

Modules by API surface

internal/go/src/goobj/objfile.go135 symbols
internal/go/src/src/pos.go49 symbols
internal/go/src/objfile/objfile.go34 symbols
internal/go/src/objabi/flag.go27 symbols
internal/go/src/archive/archive.go25 symbols
internal/go/src/xcoff/file.go24 symbols
internal/go/src/objfile/disasm.go21 symbols
internal/go/src/src/xpos.go20 symbols
internal/go/src/xcoff/xcoff.go18 symbols
internal/go/src/objfile/goobj.go15 symbols
internal/go/src/goobj/funcinfo.go15 symbols
internal/go/src/buildcfg/cfg.go15 symbols

Dependencies from manifests, versioned

gioui.orgv0.0.0-2023020618080 · 1×
gioui.org/cpuv0.0.0-2021081707593 · 1×
gioui.org/shaderv1.0.6 · 1×
github.com/benoitkugler/textlayoutv0.3.0 · 1×
github.com/go-text/typesettingv0.0.0-2022121415372 · 1×
golang.org/x/archv0.2.0 · 1×
golang.org/x/expv0.0.0-2022101221100 · 1×
golang.org/x/exp/shinyv0.0.0-2022082720423 · 1×
golang.org/x/imagev0.0.0-2022072215523 · 1×
golang.org/x/sysv0.0.0-2022082520400 · 1×
golang.org/x/textv0.3.7 · 1×

For agents

$ claude mcp add lensm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact