title: Cygwin Terminal GDB list function not working
body: <p>I recently downloaded cygwin terminal 32 bit with gdb, gcc, and g++. I wrote a simple c program and called it code.c. It goes as follows:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
    int i;
    for(i = 0; i&lt;10; i++)
    {
      printf("Hello, World!\n");
    }
  }
  </code></pre>
  
  <p>First I opened cygwin terminal, navigated to the appropriate directory, and ran the command:</p>
  
  <pre><code>gcc code.c
  </code></pre>
  
  <p>This worked correctly and it created an executable called a.exe in the same directory.
  I then loaded the executable's symbols into gdb and initialized gdb with the following command:</p>
  
  <pre><code>gdb -q ./a.exe
  </code></pre>
  
  <p>This also works correctly as it says: 
  <code>Reading symbols from ./a.exe...done.</code></p>
  
  <p>Then I tested out some of gdb's functions.</p>
  
  <p><code>disassemble main</code> outputted the correct assembly instructions and <code>run</code> correctly ran the program.</p>
  
  <p>However, when I tried <code>list</code> in order to output the c source code, I received no output and when I typed <code>list main</code> I received the following:</p>
  
  <pre><code>1        usr/src/debug/cygwin-2.3.1-1/winsup/cygwin/crt0.c: No such file or directory
  </code></pre>
  
  <p>My problem is that the list command was working previously and for some reason stopped working correctly. I'm thinking it may be a problem with my cygwin installation or maybe that I added c:\cygwin\bin to my windows Path variable manually. Any help or suggestions would be appreciated.</p>