Use NAL (nop-and-link) to get the current PC.
This commit is contained in:
parent
b5412104dc
commit
5c6aa0100d
|
@ -107,9 +107,8 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes,
|
||||||
ra = (register_t)(intptr_t)__builtin_return_address(0);
|
ra = (register_t)(intptr_t)__builtin_return_address(0);
|
||||||
|
|
||||||
__asm __volatile(
|
__asm __volatile(
|
||||||
"jal 99f\n"
|
"nal\n"
|
||||||
"nop\n"
|
" nop\n"
|
||||||
"99:\n"
|
|
||||||
"move %0, $31\n" /* get ra */
|
"move %0, $31\n" /* get ra */
|
||||||
"move $31, %1\n" /* restore ra */
|
"move $31, %1\n" /* restore ra */
|
||||||
: "=r" (pc)
|
: "=r" (pc)
|
||||||
|
|
Loading…
Reference in New Issue