读书人

怎么在userspace enable gcov

发布时间: 2012-09-05 15:19:35 作者: rapoo

如何在userspace enable gcov

1. Add gcc parmater "-fprofile-arcs and -ftest-coverage flags" and compile the program.

2. Run the programer, will generate gcno data.

3. Use the command gcc *.c can see the coverage total data.

Use the lcov -d -c -o test.info

4. Generate HTML

genhtml test.info -o html_test (folder)

读书人网 >移动开发

热点推荐