[go-nuts] Re: mixed C / Go debugging

2017-06-13 Thread Alain Mellan
Haha, I agree, Printf is my debugging tool of choice, but some in my team like debuggers ... On Monday, June 12, 2017 at 5:40:30 PM UTC-7, brainman wrote: > > > ... I also tried to load the go extension for gdb with "source > C:/utils/go/src/runtime/runtime-gdb.py", but it doesn't do much good,

[go-nuts] Re: mixed C / Go debugging

2017-06-12 Thread Alain Mellan
u describe is exactly what I was afraid of :-) It would be nice to have a dbg_break() call in Go that would wait for dlv to connect, irrespective of whether Go is embedded in C/C++ or not. -- alain. On Tuesday, June 6, 2017 at 5:41:01 PM UTC-7, Alain Mellan wrote: > > Hi, > > I need to

[go-nuts] Re: mixed C / Go debugging

2017-06-07 Thread Alain Mellan
Sure, this is what I did. I'm working on Windows with MinGW. sayhello.go: // package name: hello package main import "C" import "fmt" //export SayHello func SayHello() { fmt.Printf("Hello!\n") fmt.Scanln() fmt.Printf("Goodbye\n") } func main() { // We need the main function to make possible

[go-nuts] mixed C / Go debugging

2017-06-06 Thread Alain Mellan
Hi, I need to have a Go application wrapped in a DLL with a thin C layer so that I can load the .dll (I'm on Windows) from a C/C++ application. What are my options for debugging the Go code? When I load my app from gdb, it seems the Go code is a black box, and dlv does not seem to be able to