Replies: 1 comment 2 replies
-
We never put in any work into debugging C++ code, but it does understand cgo to some extent. Disabling optimizations for the C++ library (CFLAGS="-O0 -g")would make things better, but if it only happens in production you probably can't do it. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
we have a C++ application dynamically loading at runtime a shared library written in GO and implementing a C interface throw CGO.
Sometime the application crashes during a call to one of the interface's APIs, so, apparently, the crash happens during the execution of the GO code: the analysis of the core with GDB shows the stack until the call of the CGO function, something corrupted after that (as it would be the stack for other threads...).
No panic stack or other error are generated to standard output/error.
Do you think we can use delve to analyse the generated core? Do we have to set something particular?
Consider that the problem always happens on production machine, that we cannot directly access to debug.
Any help is really appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions