title: GDB ignores my breakpoints
body: <p>My test case is so simple that I must be doing something very stupid. I wrote a simple source file <code>test.c</code>:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  int main(int argc,char* argv[]){
      printf("1\n");
      printf("2\n");
      printf("3\n");
      return 0;
  }
  </code></pre>
  
  <p>I compiled it with <code>gcc -g test.c</code> and started GDB with <code>gdb a.out</code>. Then I created a breakpoint in <code>main</code> with <code>break main</code> and ran it with <code>run</code>(also tried with <code>start</code>) - but GDB simply ignored my breakpoint!</p>
  
  <p>This is the shell session of me trying to compile <code>test.c</code> and run GDB:</p>
  
  <pre><code>[idanarye@idanarye_lg gdbtest]$ gcc -g test.c
  [idanarye@idanarye_lg gdbtest]$ gdb a.out
  GNU gdb (GDB) 7.6.1
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-unknown-linux-gnu".
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;...
  Reading symbols from /home/idanarye/gdbtest/a.out...done.
  (gdb) break main
  Breakpoint 1 at 0x40050f: file test.c, line 4.
  (gdb) run
  Starting program: /home/idanarye/gdbtest/a.out 
  1
  2
  3
  During startup program exited normally.
  (gdb) 
  </code></pre>
  
  <p>What in the world am I doing wrong here?</p>
  
  <p>I'm running a 64bit Arch Linux. My GCC version is 4.8.2.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here is the result of <code>disas main</code>:</p>
  
  <pre><code>Dump of assembler code for function main:
     0x0000000000400500 &lt;+0&gt;:     push   %rbp
     0x0000000000400501 &lt;+1&gt;:     mov    %rsp,%rbp
     0x0000000000400504 &lt;+4&gt;:     sub    $0x10,%rsp
     0x0000000000400508 &lt;+8&gt;:     mov    %edi,-0x4(%rbp)
     0x000000000040050b &lt;+11&gt;:    mov    %rsi,-0x10(%rbp)
     0x000000000040050f &lt;+15&gt;:    mov    $0x4005c4,%edi
     0x0000000000400514 &lt;+20&gt;:    callq  0x4003e0 &lt;puts@plt&gt;
     0x0000000000400519 &lt;+25&gt;:    mov    $0x4005c6,%edi
     0x000000000040051e &lt;+30&gt;:    callq  0x4003e0 &lt;puts@plt&gt;
     0x0000000000400523 &lt;+35&gt;:    mov    $0x4005c8,%edi
     0x0000000000400528 &lt;+40&gt;:    callq  0x4003e0 &lt;puts@plt&gt;
     0x000000000040052d &lt;+45&gt;:    mov    $0x0,%eax
     0x0000000000400532 &lt;+50&gt;:    leaveq 
     0x0000000000400533 &lt;+51&gt;:    retq   
  End of assembler dump. 
  </code></pre>
  
  <h1>UPDATE</h1>
  
  <p>No idea how or why, but it works now. Probably a system update fixed it...</p>