title: gdb step not working as expected
body: <p>I am debugging static multi-threaded x86-64 C++ application on Linux.</p>
  
  <p>I can set breakpoints on functions and stop on them and I can walk step by step over function body. But when I try to step into another function, gdb not stops at it's beginning and it seems that it just continues execution. When I interrupt program execution, gdb goes to broken state and becomes unusable:</p>
  
  <pre><code>(gdb) bt
  Target is executing.
  (gdb) c
  Continuing.
  Cannot execute this command while the selected thread is running.
  (gdb) 
  </code></pre>
  
  <p>As a workaround I can use <code>stepi</code> several times instead of <code>step</code>, <code>stepi</code> works as expected.
  What could be the reason of this behavior? Is there any workarounds besides using <code>stepi</code>?
  I am using gdb 7.6 and gcc 4.7.1.</p>