我想使用 R -d gdb
调试 R 包的 c 函数,但在 c 函数 C_MIM()
处设置断点后我得到以下信息,我得到了以下信息并且“找不到当前函数的边界”所以在这种情况下我无法打印出任何变量值。我做错了什么吗?或者对于某些R包,无法调试?
Breakpoint 1, 0x00007fffdee0035f in C_MIM ()
from /home/sunxd/R/x86_64-pc-linux-gnu-library/3.4/praznik/libs/praznik.so
(gdb) list
76 in ../sysdeps/unix/syscall-template.S
(gdb) n
Single stepping until exit from function C_MIM,
which has no line number information.
^C
Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7fffdddfa700 (LWP 21179)]
---Type <return> to continue, or q <return> to quit---
0x00007ffff45c707e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
最佳答案
事实证明,必须拥有源代码并使用特定的 gcc/cc 选项编译 R 包。
关于c - 调试 R 包中的 c 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48789330/