Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从 dlv 收到此错误
could not attach to pid 20727: decoding dwarf section info at offset 0x0: too short
二进制文件是这样构建的:
go build -a -v -ldflags "-w -X main.gitCommit=<sha> -linkmode 'auto' -extldflags '-static'"
您能否确认这是-w导致以下问题的标志?它会剥离调试符号吗?
-w
删除-w标志后,delve 能够附加到进程