https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64999
--- Comment #49 from Ian Lance Taylor <ian at airs dot com> --- libbacktrace returns the line number that you actually care about: the line number of the call instruction. There is no question that that is correct. You say that it is a problem if the PC does not match the line number, but to me that sounds like a conceptual problem. What is the actual problem? The pprof.go code expects to get the PC after the call instruction, and tries to turn it into the PC of the call instruction. I think we can all agree that pprof.go should in fact see the PC after the call instruction. The simple way to do that is for callback in libgo/runtime/go-callers.c to increment pc before storing it in loc->pc. Apparently there is some problem with that but I do not know what that problem is. The additional argument I mentioned would be for the function types backtrace_fulL_callback and backtrace_simple_callback defined in libbacktrace/backtrace.h. The additional argument would be, essentially, the value of ip_before_insn in libbacktrace/backtrace.c and libbacktrace/simple.c. The argument would tell you whether the PC follows a call instruction, or whether it is the correct PC for a signal frame instruction.