0

Go语言实践技巧(15)——禁止编译优化

Posted by nanxiao on 五月 14, 2016 in Go语言实践技巧 |

如果要用gdbdelve等调试器调试Go程序,应该在编译时使用-gcflags "-N -l"禁止编译器优化,否则在调试代码时可能会观察到奇怪的现象。

参考资料:
Debugging Go Code with GDB
A question about using delve to print slice info.

 

标签:

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Copyright © 2013-2017 我的站点 All rights reserved.
This site is using the Multi Child-Theme, v2.2, on top of
the Parent-Theme Desk Mess Mirrored, v2.5, from BuyNowShop.com