Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread mariappan balraj
Hi Ian, Thanks for your continuous support. GOLANG supports CGO to invoke C functions. When it is supported, the important thing is, it should provide better debugging support when there is any issue. In customer sites, it is not possible to run applications with GDB. Customers only provide core d

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread Ian Lance Taylor
On Fri, Jan 6, 2023, 5:57 PM mariappan balraj wrote: > Hi Ian, > Thanks for your active help. When I run the program by using gdb, I am > getting the complete stack. No issue. The issue is there when we debug core > dump. Could you kindly please check whether you are seeing the same > behavior wi

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread mariappan balraj
Hi Ian, Thanks for your active help. When I run the program by using gdb, I am getting the complete stack. No issue. The issue is there when we debug core dump. Could you kindly please check whether you are seeing the same behavior with core dump? Best Regards Mariappan On Sat, 7 Jan, 2023, 7:03

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread Ian Lance Taylor
On Fri, Jan 6, 2023 at 5:28 PM mariappan balraj wrote: > > 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

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread mariappan balraj
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 t

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread Ian Lance Taylor
On Thu, Jan 5, 2023 at 10:39 PM mariappan balraj 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

Re: [go-nuts] Which tool provide's the Go playground's import handling...

2023-01-06 Thread 'Mark' via golang-nuts
Thanks, that's just what I needed :-) On Friday, January 6, 2023 at 8:21:02 AM UTC kortschak wrote: > On Fri, 2023-01-06 at 00:13 -0800, 'Mark' via golang-nuts wrote: > > If I visit the Go playground and change the body of `main()` to, say, > > `fmt.Println("hello", math.Abs(-5))` and then click

Re: [go-nuts] Which tool provide's the Go playground's import handling...

2023-01-06 Thread 'Dan Kortschak' via golang-nuts
On Fri, 2023-01-06 at 00:13 -0800, 'Mark' via golang-nuts wrote: > If I visit the Go playground and change the body of `main()` to, say, > `fmt.Println("hello", math.Abs(-5))` and then click Run, the `import > "fmt"` line is _automatically_ corrected to be `import > (\n\t"fmt"\n\t"math"\n)`. I'd li

[go-nuts] Which tool provide's the Go playground's import handling...

2023-01-06 Thread 'Mark' via golang-nuts
If I visit the Go playground and change the body of `main()` to, say, `fmt.Println("hello", math.Abs(-5))` and then click Run, the `import "fmt"` line is _automatically_ corrected to be `import (\n\t"fmt"\n\t"math"\n)`. I'd like to be able to use this functionality so tha