I have inherited a fairly large code base, 90% C ++, and I need to quickly speed it up. There are hundreds of .cc files in a large directory tree structure.
It is quite complex and has no registration. To find out how some basic subsystems work, I want to insert a function call into each function.
For example, given a .cc file full of things like this:
void A::foo(int a, int b) {
}
void A::bar() {
}
void B::bleh(const string& in) {
}
I would like to get the following:
void A::foo(int a, int b) {
LOG(debug) << "A::foo() called.";
}
void A::bar() {
LOG(debug) << "A::bar() called.";
}
void B::bleh(const string& in) {
LOG(debug) << "B::bleh() called.";
}
This can be done using a python script, CMD script, power shell script, etc. If there is a way to do VS, do it, great. Whatever works. No need to be beautiful, I do not test it.
In addition, he does not have to receive everything. For example. nested classes, implementations in header files, etc.