You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. http://play.golang.org/p/zd59eWdmqw
2. The first and second line report different line numbers (off by 1) by they should be
the same
3. The other line numbers also seem not 100% correct.
The text was updated successfully, but these errors were encountered:
The output is correct. The caller PC is where the call will return. To get the PC of the
call instruction you have to back up one instruction. It suffices on all systems to back
up one byte, provided you're not already at the start of the function (meaning something
funny is going on and there was no call instruction). This is partly why runtime.Caller
returns the file and line, so that ordinary uses don't need to do this computation. But
here it is, working:
http://play.golang.org/p/lTWpWsrIT3
The text was updated successfully, but these errors were encountered: