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 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 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 attach properly to the process that is running > app + go dll. > > Am I missing something? Any suggestions? > > -- alain. > -- 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.