title: Is there a quick way to display the source code at a breakpoint in gdb?
body: <p>I've set a breakpoint in gdb, and I'd like to see the exact line of source the breakpoint is on, just to confirm it's correct -- is there a quick way to do this?</p>
  
  <p>The "info b" command gives me information about the breakpoints, but it doesn't display source:</p>
  
  <pre><code>(gdb) info b
  Num     Type           Disp Enb Address            What
  1       breakpoint     keep y   0x00000000006c3ba4 in MyClass::foo(bar*)
                                                     at /home/user1/src/MyClass.cpp:1021
  </code></pre>
  
  <p>I can type "list MyClass.cpp:1021" to see the lines around this breakpoint, but I'm wondering if there's a shorter way. Googling and reading the gdb manual didn't turn up anything.</p>
  
  <p>I know that if I'm executing the program and have hit the breakpoint, I can just type "list", but I'm asking specifically about the case where I am not  at the breakpoint (the program may not even be running).</p>