systemtap/tests/Regression/RHEL6Feature-cpp-backtraces/classes.cpp

44 lines
719 B
C++
Raw Normal View History

#include "classes.hpp"
#include <iostream>
void A::privateA1(){
std::cout << "privateA1" << std::endl;
this->privateA2();
}
void A::privateA2(){
std::cout << "privateA2" << std::endl;
this->recursiveA1(3);
}
void A::recursiveA1(int count){
std::cout << "recursiveA1: " << count << std::endl;
if (count == 0)
return;
this->recursiveA1(count-1);
return;
}
void A::publicA1(){
std::cout << "publicA1" << std::endl;
this->publicA2();
}
void A::publicA2(){
std::cout << "publicA2" << std::endl;
this->privateA1();
}
void B::privateB1(A a){
std::cout << "privateB1" << std::endl;
a.publicA1();
}
void B::publicB1(A a){
std::cout << "publicB1" << std::endl;
this->privateB1(a);
}