brahma-adshonor / gohook

a funny library to hook golang function at runtime
https://www.cnblogs.com/catch/p/10973611.html
MIT License
513 stars 72 forks source link

Work on debug version, but not work for release version #27

Closed jezhang2014 closed 3 years ago

jezhang2014 commented 4 years ago

I used go 1.13.5 version on both windows and linux with github.com/brahma-adshonor/gohook v0.0.0-20191009123657-4dfde2738c74, and run sample. it seems only work as expected on debug mode, not work on release mode.

kmalloc commented 4 years ago

@jezhang2014 debug mode 是什么意思?出错信息是什么?怎么复现? btw,编译例子的时候需要禁掉 inline

liov commented 4 years ago

我估计是fmt.Println在release模式下会被内联