[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-12 Thread Xiangdong JI
Thank your Derek, that's really helpful. On Tuesday, November 12, 2019 at 10:52:58 PM UTC+8, Derek Parker wrote: > > If you look at the output of your first command you see the result > `(**runtime.g)()`, however you're trying to cast to > `(runtime.g*)()`. The correct syntax you're looking

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-12 Thread Derek Parker
If you look at the output of your first command you see the result `(**runtime.g)()`, however you're trying to cast to `(runtime.g*)()`. The correct syntax you're looking for is ` *(*runtime.g)()`. Hope that helps! On Monday, November 11, 2019 at 11:29:42 PM UTC-8, Xiangdong JI wrote: > > Hi

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-12 Thread Max
I just tried with latest delve, and 'p runtime.m0.curg' is enough: (dlv) p runtime.m0.curg *runtime.g nil (dlv) break main.main (dlv) continue [...] (dlv) p runtime.m0.curg *runtime.g { stack: runtime.stack {lo: 824635269120, hi: 824635285504}, stackguard0: 82463527, stackguard1:

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-11 Thread Xiangdong JI
Hi Derek, Say I have the pointer value of a specific G struct, how to convert it to 'struct g' (or any other form) in delve so that I can check the details of its fields? For example (simply utilized runtime.m0.curg to get a pointer value here) (dlv) p (**runtime.g)(0x56a140) Just tried a

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-11 Thread xiangdong...@gmail.com
Hi Derek, Say I have the pointer value of a specific G struct, how to convert it to 'struct g' (or any other form) in delve so that I can check the details of its fields? For example (simply utilized runtime.m0.curg to get a pointer value here) (dlv) p (**runtime.g)(0x56a140) Just tried a

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-11 Thread Derek Parker
Can you reply with a gist showing the exact Delve commands you are attempting to use and what errors are being returned? There is some more information on the expression parser here . You can also open an issue on the