美文网首页
golang调试工具delve

golang调试工具delve

作者: liuhaonan00 | 来源:发表于2022-02-07 00:03 被阅读0次

    https://studygolang.com/articles/16244

    delve是golang推荐的专门go语言调试工具,用来替代gdb,因为:golang组织说delve能更好的理解go语言。

    • golang说delve更能理解go语言:https://golang.org/doc/gdb
      Note that Delve is a better alternative to GDB when debugging Go programs built with the standard toolchain. It understands the Go runtime, data structures, and expressions better than GDB. Delve currently supports Linux, OSX, and Windows on amd64. For the most up-to-date list of supported platforms, please see the Delve documentation.

      GDB does not understand Go programs well. The stack management, threading, and runtime contain aspects that differ enough from the execution model GDB expects that they can confuse the debugger and cause incorrect results even when the program is compiled with gccgo. As a consequence, although GDB can be useful in some situations (e.g., debugging Cgo code, or debugging the runtime itself), it is not a reliable debugger for Go programs, particularly heavily concurrent ones. Moreover, it is not a priority for the Go project to address these issues, which are difficult.

    • delve的github地址:https://github.com/derekparker/delve

    相关文章

      网友评论

          本文标题:golang调试工具delve

          本文链接:https://www.haomeiwen.com/subject/lcipkrtx.html