Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/332.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
Python 如何直接从共享库初始化llvm覆盖率?_Python_Shared Libraries_Llvm_Gcov_Lcov - Fatal编程技术网

Python 如何直接从共享库初始化llvm覆盖率?

Python 如何直接从共享库初始化llvm覆盖率?,python,shared-libraries,llvm,gcov,lcov,Python,Shared Libraries,Llvm,Gcov,Lcov,我正在测试一个C/C++共享库,在该库中,我使用-fprofile arcs-ftest coverage-pg标志编译库,并使用-fprofile arcs-ftest coverage标志链接库 我正在通过cTypesPython例程加载和测试Python中的共享库 Gcda文件不会从python生成,因为我的python二进制文件未链接到-fprofile arcs-ftest coverage标志 如果我从lldb/gdb运行python,那么gcda文件将生成为lldb/gdb并使用适

我正在测试一个C/C++共享库,在该库中,我使用
-fprofile arcs-ftest coverage-pg
标志编译库,并使用
-fprofile arcs-ftest coverage
标志链接库

我正在通过cTypesPython例程加载和测试Python中的共享库

Gcda文件不会从python生成,因为我的python二进制文件未链接到
-fprofile arcs-ftest coverage
标志

如果我从
lldb/gdb
运行python,那么gcda文件将生成为
lldb/gdb
并使用适当的覆盖标志进行编译

是否可以调用适当的覆盖率函数来初始化配置文件弧,并在调用共享库中的函数之前测试覆盖率,然后调用适当的覆盖率关闭例程

我在我的库上做了一个nm,注意到以下例程,但不确定如何调用它们

___llvm_gcov_init
___llvm_gcov_flush
___llvm_writeout_files
看起来llvm_gcov_init需要参数,所以我不能直接从python调用它


我想直接初始化代码覆盖率,而不需要在多台机器上重新编译覆盖率为的python。

嗨,我遇到了一个类似的问题,你知道怎么解决吗?不,你解决了吗?嗨,我遇到了一个类似的问题,你知道怎么解决吗?不,你解决了吗?