[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 brainman
> ... 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, Yes, I tried that recently. It didn't work for me either. From what I remember, you had to have "python support" with gdb, and that, apparently, is hard. I

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

2017-06-12 Thread Alain Mellan
Hi Alex, Thanks for spending some time on this! Duh, I missed the gcc/g++ -g flag. It helps a little bit. 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 still executes as a black box. What you describe is

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

2017-06-11 Thread brainman
Thank you very much for instructions. I could reproduce what you see. Unfortunately I do not have much to suggest. dlv expects executable to be written in Go. dlv searches executable for particular symbols (among many other things). That is why you see "could not get Go symbols no

[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] Re: mixed C / Go debugging

2017-06-06 Thread brainman
It would be useful if you provide complete instructions of what you did, so we could at least be able to reproduce it here. Including complete source code and description of environment and tools you use. Thank you. Alex -- You received this message because you are subscribed to the Google