Debug Tool for golang

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Debug Tool for golang

Kevin Chadwick-4
It seems delve which is suggested by golang.org due to optimised binary support
expects a Linux /proc and Linux threads (FreeBSD delve github issue tracker). So
I guess without delve then building unoptimised binaries would be required which
is possibly to be expected when debugging. I'm not sure that should make delve
the preferred tool, if it is platform centric!

Does anyone debug golang on OpenBSD and can advise on llvm/gcc or provide any
other insight?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Debug Tool for golang

paul wisehart
On Fri, May 31, 2019 at 01:11:41PM +0100, Kevin Chadwick wrote:
> It seems delve which is suggested by golang.org due to optimised binary support
> expects a Linux /proc and Linux threads (FreeBSD delve github issue tracker). So
> I guess without delve then building unoptimised binaries would be required which
> is possibly to be expected when debugging. I'm not sure that should make delve
> the preferred tool, if it is platform centric!
>
> Does anyone debug golang on OpenBSD and can advise on llvm/gcc or provide any
> other insight?

I use Go on OpenBSD a lot, and I have always done my serious debugging using
Printf or logging.  I would like to use delve as well, and have considered
getting it to work on OpenBSD.

https://github.com/go-delve/delve/pull/1480

It looks like there is current work getting it supported in FreeBSD.
Would that be a better starting point for OpenBSD?

I'm pretty noob at C, but I have recently been learning it pretty seriously.
(for whatever that's worth)

I guess I'm not adding much except that Go on OpenBSD is great, and I have never
been stuck by not having delve.

thanks,
Paul

 

Reply | Threaded
Open this post in threaded view
|

Re: Debug Tool for golang

Ted Unangst-6
In reply to this post by Kevin Chadwick-4
Kevin Chadwick wrote:
> Does anyone debug golang on OpenBSD and can advise on llvm/gcc or provide any
> other insight?

I just use log.

Reply | Threaded
Open this post in threaded view
|

Re: Debug Tool for golang

Kevin Chadwick-4
On 5/31/19 5:28 PM, Ted Unangst wrote:
> Kevin Chadwick wrote:
>> Does anyone debug golang on OpenBSD and can advise on llvm/gcc or provide any
>> other insight?
>
> I just use log.
>

Yep, not missing a trick then and apparently the old recommendation, Thanks all.

https://blog.golang.org/debugging-go-code-status-report

"When it comes to debugging, nothing beats a few strategic print statements to
inspect variables or a well-placed panic to obtain a stack trace. However,
sometimes you’re missing either the patience or the source code, and in those
cases a good debugger can be invaluable. That's why over the past few releases
we have been improving the support in Go’s gc linker (6l, 8l) for GDB, the GNU
debugger."