Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
I’m to instrument GCC and Gcov to collect execution sequence information. While my approach works well for **c** programs on `x86` and `x86_64`, I’m encountering a segmentation fault when attempting to instrument a **C++** program on `x86_64`.
“`C++
#include
#include
#include
using namespace std;
int main() {
vector
sort(numbers.begin(), numbers.end(), greater
for (int num : numbers) {
cout << num << " ";
}
cout << endl;
return 0;
}```
When I compile this program with GCC and Gcov on a `64-bit Intel processor x86_64` and attempt to run it, I encounter a segmentation fault.
I'm using GCC version 3.4.5 on CentOS 6.4.
My instrumentation code is being inserted correctly and there are no other obvious issues in the code.
Does anyone have experience with similar issues or suggestions for troubleshooting?
CONTRIBUTE TO THIS THREAD