Debugging with GDB - seeing code around a given breakpoint
<p>I am trying to debug a C++ program using GDB. I have set 15 breakpoints. Most of the breakpoints are in different files. After the first 5 breakpoints, it became difficult to remember what line of code any given breakpoint refers to. </p>

<p>I struggle quite a bit simply trying to recall what a given breakpoint refers to. I find this quite distracting. I was wondering if there is a way to tell gdb to display code around a certain breakpoint. </p>

<p>Something like this - <code>$(gdb) code 3</code> shows 30 lines of code around breakpoint 3. Is this possible today. Could you please show me how?</p>

<p>I run gdb in tui mode, and I also keep emacs open to edit my source files.</p>