I had to remove '-gcflags "-N -l"' because I could not set a breakpoint.
* * *
(gdb) b 'shconf.TestScanKeys'
Function "shconf.TestScanKeys" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 ('shconf.TestScanKeys') pending.
(gdb) run
Starting program: /home/neo/go/src/
github.com/kless/shutil/shconf/shconf.test * * *
At this point, I had to interrupt it, since I follow having the same issue that using "go test" directly.
The program does not exit, it remains halted.
* * *
^C
Program received signal SIGINT, Interrupt.
runtime.futex () at /usr/local/go/src/pkg/runtime/sys_linux_amd64.s:267
267 RET
* * *
But I want to know where it is halted. This is the information of "bt":
(gdb) bt
#0 runtime.futex () at /usr/local/go/src/pkg/runtime/sys_linux_amd64.s:267
#1 0x00000000004111f9 in runtime.futexsleep (addr=void, val=void, ns=void)
at /usr/local/go/src/pkg/runtime/os_linux.c:58
#2 0x0000000000409b49 in runtime.notesleep (n=void)
at /usr/local/go/src/pkg/runtime/lock_futex.c:125
#3 0x0000000000414b5f in stopm () at /usr/local/go/src/pkg/runtime/proc.c:795
#4 0x00000000004163f8 in exitsyscall0 (gp=void)
at /usr/local/go/src/pkg/runtime/proc.c:1417
#5 0x0000000000420ed9 in runtime.mcall (fn=void)
at /usr/local/go/src/pkg/runtime/asm_amd64.s:195
#6 0x00000000005c1280 in runtime.g0 ()
#7 0x0000000000420da6 in _rt0_amd64 ()
at /usr/local/go/src/pkg/runtime/asm_amd64.s:86
#8 0x0000000000000001 in ?? ()
#9 0x00007fffffffe118 in ?? ()
#10 0x0000000000000001 in ?? ()
#11 0x00007fffffffe118 in ?? ()
#12 0x0000000000000000 in ?? ()