1class DummyClass { 2 int a_; 3 public: 4 DummyClass(int a) : a_(a) {} 5 int add(int b) { 6 return a_ + b; 7 } 8}; 9 10int f(int a, int b) { 11 DummyClass c(a); 12 return c.add(b); 13} 14 15int main() { 16 return f(2, 3); 17} 18 19// Built with Clang 3.2: 20// $ mkdir -p /tmp/dbginfo 21// $ cp dwarfdump-test.cc /tmp/dbginfo 22// $ cd /tmp/dbginfo 23// $ clang++ -g dwarfdump-test.cc -o <output> 24 25// The result is also used as an input to .dwz tool: 26// $ cp <output> output1.dwz 27// $ cp <output> output2.dwz 28// $ dwz -m output.dwz -r output1.dwz output2.dwz 29// $ rm output2.dwz 30 31// The mach-o version was generated using clang-3.6.2. 32