Hi Ian, I am not expecting GO stack. I am interested only in getting C stack. If I want go stack, I can use delve debugger to get it. From GO, using CGO, test3() is called which is calling test2() which is calling test1(). I am expecting only C stack which contains test3(), test2(), test1(). In this particular case assigning value by using pointer variable which contains NULL(segmentation fault). I am seeing only test1(). After that it is not stack and saying stack corruption. I strongly believe that you can help on this. Please help.
Best regards Mariappan On Sat, 7 Jan, 2023, 12:12 am Ian Lance Taylor, <i...@golang.org> wrote: > On Thu, Jan 5, 2023 at 10:39 PM mariappan balraj > <mariappan.bal...@gmail.com> wrote: > > > > When I call the same function from pure C code, I am able to get the > complete stack and it is not reporting that the stack is corrupted. I am > expecting the same C stack when I use CGO also. Please kindly help with > this. > > C code and Go code run on different stacks. As I tried to explain > earlier, gdb does not have enough information to unwind from a C stack > to a Go stack. > > What you are looking for simply doesn't work. Sorry. > > Ian > -- 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/CAKKWi6STx%2BXNYfG3srky_8YpnqOTaC62n6UzNr3C2s%3Dhds460Q%40mail.gmail.com.