Descriptionruntime: change top-most return PC from goexit to goexit+PCQuantum
If you get a stack of PCs from Callers, it would be expected
that every PC is immediately after a call instruction, so to find
the line of the call, you look up the line for PC-1.
CL 163550043 now explicitly documents that.
The most common exception to this is the top-most return PC
on the stack, which is the entry address of the runtime.goexit
function. Subtracting 1 from that PC will end up in a different
function entirely.
To remove this special case, make the top-most return PC
goexit+PCQuantum and then implement goexit in assembly
so that the first instruction can be skipped.
Fixes issue 7690.
Patch Set 1 #Patch Set 2 : diff -r a49aaae9548d7b960db23bf60dc0dc3f420c6786 https://code.google.com/p/go/ #Patch Set 3 : diff -r a49aaae9548d7b960db23bf60dc0dc3f420c6786 https://code.google.com/p/go/ #Patch Set 4 : diff -r eed6d37ef785018594553b16ca5c2ef81d89a7ee https://code.google.com/p/go/ #
MessagesTotal messages: 3
|