On Mon, Aug 22, 2016 at 9:27 AM,  <derek.buitenh...@gmail.com> wrote:
> Quite excited by the prospects of easier debugging of CGO applications using
> runtime.SetCgoSymbolizer at work,
> since we must necessarily use CGO, and it's usually been rather painful to
> use a mix of delve, perf, and gdb to debug
> these programs.
>
> The documentation for this is rather (necessarily) complex, and I was
> wondering if there is a "simple" example around,
> aside from the tests in the Go repo itself?
>
> I'm aware of: https://github.com/ianlancetaylor/cgosymbolizer
>
> It looks great, but doesn't seem to work at all with a contrived example I
> wrote[1]. I'm aware it's labelled experiment,
> but perhaps Ian may comment. Mostly, I am asking on this list before I dive
> into the deep end and try and write my
> own handler, which will no doubt be a very large undertaking.

What do you see when you run your program?  This is what I see, and it
is what I expect; note that "crash.c:5" line.  Do you see something
different?  If this is what you see, how does it differ from what you
expect?

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Pre-crash
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x47d859]

runtime stack:
runtime.throw(0x4b13e9, 0x2a)
        /home/iant/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
        /home/iant/go/src/runtime/sigpanic_unix.go:12 +0x2cc
runtime.asmcgocall(0xc42004de28, 0xc420014280)
        /home/iant/go/src/runtime/asm_amd64.s:594 +0x70
runtime.cgocall(0x7fff8c4d8580, 0x703940, 0x7fff8c4d8570)
        /home/iant/go/src/runtime/cgocall.go:115 +0xed

goroutine 1 [syscall, locked to thread]:
crash_now
        /home/iant/gopath/src/cgo13/crash.c:5 pc=0x47d859
runtime.asmcgocall
        /home/iant/go/src/runtime/asm_amd64.s:590 pc=0x451e3f
runtime.cgocall(0x47d840, 0xc42004dea0, 0x0)
        /home/iant/go/src/runtime/cgocall.go:131 +0x110 fp=0xc42004de58 
sp=0xc42004de18
main._Cfunc_crash_now(0x1, 0x1637050)
        cgo13/_obj/_cgo_gotypes.go:53 +0x45 fp=0xc42004dea0 sp=0xc42004de58
main.crash()
        /home/iant/gopath/src/cgo13/crash.go:14 +0x4c fp=0xc42004dec8 
sp=0xc42004dea0
main.main()
        /home/iant/gopath/src/cgo13/crash.go:19 +0xa4 fp=0xc42004df48 
sp=0xc42004dec8
runtime.main()
        /home/iant/go/src/runtime/proc.go:183 +0x1f4 fp=0xc42004dfa0 
sp=0xc42004df48
runtime.goexit()
        /home/iant/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc42004dfa8 
sp=0xc42004dfa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /home/iant/go/src/runtime/asm_amd64.s:2086 +0x1

Reply via email to