Home | History | Annotate | Download | only in host-tests
      1 // RUN: %clangxx %s -g -fexceptions %extra-clang-opts -o %t
      2 // RUN: %Test_jit_debuginfo %s %t
      3 // DEBUGGER: set verbose on
      4 // DEBUGGER: run
      5 // DEBUGGER: bt 2
      6 // CHECK: function_with_a_segfault
      7 // CHECK: some_function
      8 
      9 static int function_with_a_segfault() {
     10   int* bla = 0;
     11   *bla = 5;
     12   return 0;
     13 }
     14 
     15 static int some_function() {
     16   return function_with_a_segfault();
     17 }
     18 
     19 static int foo() {
     20   return some_function();
     21 }
     22 
     23 static int bar() {
     24   return foo();
     25 }
     26 
     27 int main() {
     28   return bar();
     29 }
     30