title: GDB on Mac OS X v10.12.6, program terminated with Unknown signal
body: <p>I'm trying to use GBD on this pice of code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  double global1 = 55.5;
  double global2 = 66.6;
  
  int gg(int a) {
    int p = 55;
    int q = 66;
    int r = p + a;
    r += q;
    char c;
    for(c = 0; c&lt;100; c++) {
      r += 5;
      if(r == q)
        r--;
    }
    return r;
  }
  
  int hh(int a) {
    int i;
    int s = 1;
    for(i = 0; i &lt; a/3; i++) {
      s *= 3;
      s /= 2;
    }
    return s;
  }
  
  int ff() {
    int sum = 0;
    int k;
    for(k = 0; k &lt; 33; k++) {
      global1 += 0.1;
      global2 += 0.2;
      int m = k*2;
      sum += gg(m);
      sum += hh(m);
    }
    return sum;
  }
  
  int main() {
    int x = ff();
    printf("x = %d\n", x);
    return 0;
  }
  </code></pre>
  
  <p>After compiling with the flag -g, and using </p>
  
  <pre><code>(gbd) run
  </code></pre>
  
  <p>I get the following error: </p>
  
  <p>[New Thread 0x1403 of process 33449]
  During startup program terminated with signal ?, Unknown signal.</p>
  
  <p>I made sure I had gdb up to date. I followed this other <a href="https://stackoverflow.com/questions/40110435/unknown-ending-signal-when-using-debugger-gdb">question</a>  and created a .gdbnit file but the problem still persits. </p>