Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C程序模拟gdb调用函数在内核上执行_C_Gdb_Core - Fatal编程技术网

C程序模拟gdb调用函数在内核上执行

C程序模拟gdb调用函数在内核上执行,c,gdb,core,C,Gdb,Core,在我的程序中,IP前缀存储为Trie。我想从程序生成的LinuxCoreDump中转储trie。我已经有了一个C函数,它遍历树并打印树中存储的前缀。然而,使用gdb,我不能通过调用这个函数来转储trie。是否可以编写一个程序来加载内核并通过链接转储Trie的库来调用此函数。(我正在考虑使用Python gdb模块,但这需要我将C程序转换为Python) 谢谢你的帮助 是否可以编写一个程序来加载内核并通过链接转储Trie的库来调用此函数。(我正在考虑使用Python gdb模块,但这需要我将C程序

在我的程序中,IP前缀存储为Trie。我想从程序生成的LinuxCoreDump中转储trie。我已经有了一个C函数,它遍历树并打印树中存储的前缀。然而,使用gdb,我不能通过调用这个函数来转储trie。是否可以编写一个程序来加载内核并通过链接转储Trie的库来调用此函数。(我正在考虑使用Python gdb模块,但这需要我将C程序转换为Python)

谢谢你的帮助

是否可以编写一个程序来加载内核并通过链接转储Trie的库来调用此函数。(我正在考虑使用Python gdb模块,但这需要我将C程序转换为Python)

当然:您可以将源代码构建到共享库中,将共享库包装到Python中,然后让Python加载并调用它

但是,将C程序转换成普通Python可能要容易得多