title: gdb breakpoint gets hit in the wrong line number
body: <p>In gdb, I set a breakpoint to make gdb stop when the first <code>if</code> condition is met. But gdb stops in another line and <code>if</code> condition isn't met. I've read <a href="https://stackoverflow.com/questions/15550558/gdb-breakpoint-does-not-get-hit">gdb breakpoint does not get hit</a>, but it's stll not solved. I think gdb stops only when <code>if (a == 1)</code> is met and just in line 3282. Am I wrong?</p>
  
  <pre><code>#pragma GCC push_options
  #pragma GCC optimize("O0")
  
  static void __attribute__ ((noinline)) search(int a, int b) 
  {  
      // other code here 
  
      if (a == 1) {
          printf("condition1\n"); 
          printf("condition1\n"); // line 3282, breakpoint is set here   
      }
      if (b == 1) {              // line 3284,  in fact, gdb stops in this line    
          printf("condition2\n");
          printf("condition2\n");
      }
  }
  #pragma GCC pop_options
  </code></pre>
  
  <p>set breakpoint in line 3282 using command <code>b file.c:3282</code></p>
  
  <blockquote>
    <p>Breakpoint 1 at 0x40da02: file file.c, line
    3282.</p>
  </blockquote>
  
  <p><code>info breakpoint</code> shows:</p>
  
  <blockquote>
    <p>Num     Type           Disp Enb Address What<br> 
    1       breakpoint   keep y   0x000000000040da02 in
    search at file.c:3282<br>
            breakpoint already hit 1 time</p>
  </blockquote>
  
  <p>But gdb stops in <strong>line 3284, instead of 3282, and a is not equal 1</strong><br></p>
  
  <blockquote>
    <p>[Switching to Thread 0x7ffff75b8700 (LWP 3631)] <br>Breakpoint 1, search
    at file.c:3284<br> 3284              if (b == 1) {</p>
  </blockquote>
  
  <p>gcc --version</p>
  
  <blockquote>
    <p>gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2</p>
  </blockquote>