mac下配置gdb调试golang

ziyouchutuwenwu ·
**"liteide里面配置gdb为新的路径即可" -- 这是神马意思?**
#1
更多评论
=thread-group-added,id="i1" ~"GNU gdb (GDB) 8.1\n" ~"Copyright (C) 2018 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n" ~"This GDB was configured as \"x86_64-apple-darwin17.3.0\".\nType \"show configuration\" for configuration details." ~"\nFor bug reporting instructions, please see:\n" ~"<http://www.gnu.org/software/gdb/bugs/>.\n" ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n" ~"For help, type \"help\".\n" ~"Type \"apropos word\" to search for commands related to \"word\"...\n" ~"Reading symbols from /Users/duanguanjun/work/gospace/src/awesomeProject/src/src.debug..." >>> 10000010-break-insert /Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:23>>> 10000011-break-insert /Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:17>>> 10000012-break-insert /Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:23>>> 10000013-break-insert /Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:17~"done.\n" &"Loading Go Runtime support.\n" (gdb) &"set unwindonsignal on\n" =cmd-param-changed,param="unwindonsignal",value="on" 10000001^done (gdb) &"set overload-resolution off\n" =cmd-param-changed,param="overload-resolution",value="off" 10000002^done (gdb) &"handle SIGSEGV nopass stop print\n" ~"Signal Stop\tPrint\tPass to program\tDescription\n" ~"SIGSEGV Yes\tYes\tNo\t\tSegmentation fault\n" 10000003^done (gdb) &"set breakpoint pending on\n" =cmd-param-changed,param="breakpoint pending",value="on" 10000004^done (gdb) &"set width 0\n" =cmd-param-changed,param="width",value="4294967295" 10000005^done (gdb) &"set height 0\n" 10000006^done (gdb) &"set auto-solib-add on\n" 10000007^done (gdb) &"Warning: /usr/local/go/src/pkg/runtime: No such file or directory.\n" 10000008^done,source-path="/usr/local/go/src/pkg/runtime:$cdir:$cwd" (gdb) &"set substitute-path /go/src/pkg/runtime /usr/local/go/src/pkg/runtime\n" 10000009^done (gdb) 10000010^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000000010b0f44",func="main.main",file="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",fullname="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",line="23",thread-groups=["i1"],times="0",original-location="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:23"} (gdb) 10000011^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00000000010b0b54",func="main.main",file="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",fullname="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",line="17",thread-groups=["i1"],times="0",original-location="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:17"} (gdb) 10000012^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00000000010b0f44",func="main.main",file="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",fullname="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",line="23",thread-groups=["i1"],times="0",original-location="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:23"} (gdb) 10000013^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x00000000010b0b54",func="main.main",file="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",fullname="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",line="17",thread-groups=["i1"],times="0",original-location="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go:17"} (gdb) 10000014^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x00000000010b0aa0",func="main.main",file="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",fullname="/Users/duanguanjun/work/gospace/src/awesomeProject/src/hello.go",line="15",thread-groups=["i1"],times="0",original-location="main.main"} (gdb) =thread-group-started,id="i1",pid="1720" =thread-created,id="1",group-id="i1" ~"[New Thread 0xb03 of process 1720]\n" =thread-exited,id="1",group-id="i1" =thread-created,id="2",group-id="i1" ~"[New Thread 0xe03 of process 1720]\n" =thread-exited,id="2",group-id="i1" =thread-created,id="3",group-id="i1" ~"[New Thread 0x1503 of process 1720]\n" 10000015^error,msg="Warning:\nCannot insert breakpoint -1.\nCannot access memory at address 0xf782\n" (gdb)
#3