thank you and yes, i'm trying to debug a SIGSEGV occurred in C code. i'm going changed my C code to some other way, since it's a bit difficult to retrieve the stack trace for debugging.. On Saturday, October 3, 2020 at 1:12:36 PM UTC+8 Kurtis Rader wrote:
> On Fri, Oct 2, 2020 at 9:49 PM aihui zhu <mr.z...@gmail.com> wrote: > >> .crash file is also acceptable for me, if it contains a stack trace. >> > > No, it does not. At least not for me when running a trivial C program that > simply dereferences a NULL pointer. It does contain some information (e.g., > the contents of the CPU registers) that coule be useful in deducing the > state of the program but a macOS ".crash" file does not contain a stack > trace. > > The default Go behavior for reporting panics does output stack traces. > However, I have no idea what CGo does and would be surprised if a panic > from the "C" code resulted in a useful backtrace of that code written to > stdout/stderr. So the problem seems to be that you are melding Go and C > code on macOS, the C code is causing a fatal error (most likely a SIGSEGV), > and you're trying to find the bug in the C code. Yes? > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e5d4de0f-8e5e-409e-87db-4f56369fad57n%40googlegroups.com.