Author: Maciej Fijalkowski <fij...@gmail.com> Branch: vmprof Changeset: r76559:8e77be4b6db3 Date: 2015-03-25 16:08 +0200 http://bitbucket.org/pypy/pypy/changeset/8e77be4b6db3/
Log: add a comment why we need to do -1 diff --git a/pypy/module/_vmprof/src/vmprof.c b/pypy/module/_vmprof/src/vmprof.c --- a/pypy/module/_vmprof/src/vmprof.c +++ b/pypy/module/_vmprof/src/vmprof.c @@ -107,6 +107,9 @@ unw_get_reg (cp, UNW_REG_IP, (unw_word_t*)&ip); unw_get_reg (cp, UNW_REG_SP, (unw_word_t*)&sp); if (!first_run) + // make sure we're pointing to the CALL and not to the first + // instruction after. If the callee adjusts the stack for us + // it's not safe to be at the instruction after ip -= 1; sp_offset = vmprof_unw_get_custom_offset(ip, cp); _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit