c - 调试 R 包中的 c 函数

标签 c r

我想使用 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/

相关文章:

c - 程序中未初始化的变量将极坐标转换为笛卡尔坐标,反之亦然(C)

c - 将函数指针转换为 void 有什么影响?

r - 如何从字符串中删除所有中文字符?

r - 层次聚类 : Determine optimal number of cluster and statistically describe Clusters

r - 如何将两个具有大矩阵的向量连接到一个数据框中?

r - 在 R 中使用正则表达式提取子字符串

C - 一次从文件读取 1 行,而不使用 fgets/getline

c - 错误: expected declaration specifiers or ‘...’ before ‘lessthen_predictable_t?

检查用户的数据

r - 如何获取向量列表形式的间隔?