title: How to open a source file in GDB
body: <p>I use GDB to attach to a running process and catch a breakpoint. I execute the following commands sequence:</p>
  
  <blockquote>
    <p>$ gdb -tui </p>
    
    <p>(gdb) attach PID</p>
  </blockquote>
  
  <p>And now I have the GUI <a href="https://sourceware.org/gdb/onlinedocs/gdb/TUI.html" rel="nofollow noreferrer">TUI view</a> open without any source file in.</p>
  
  <p>I have been desperately trying to google a way to load / open a source file to be able to execute command "break ", but unfortunately I could not find anything that would simply work.</p>