title: gdb: unknown target exception
body: <p>When trying to run a program using gdb I get</p>
  
  <pre><code>[New Thread 4612.0x158c]
  [New Thread 4612.0x1cb8]
  [New Thread 4612.0x11e8]
  [New Thread 4612.0x1190]
  gdb: unknown target exception 0x406d1388 at 0x746623d2
  
  Program received signal ?, Unknown signal.
  0x746623d2 in RaiseException () from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
  </code></pre>
  
  <p>I researched this and found three possible causes: (1) path environment variable not set, (2) drive not mapped, and (3) using the wrong version of gdb (32-bit or 64-bit). So I added C:\cygwin\bin to the path environment variable, typed mount and got</p>
  
  <pre><code>C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
  C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
  C:/cygwin on / type ntfs (binary,auto)
  C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
  D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
  </code></pre>
  
  <p>When I type show configuration get</p>
  
  <pre><code>This GDB was configured as follows:
  configure --host=i686-pc-cygwin --target=i686-pc-cygwin
            --with-auto-load-dir=$debugdir:$datadir/auto-load
            --with-auto-load-safe-path=$debugdir:$datadir/auto-load
            --with-expat
            --with-gdb-datadir=/usr/share/gdb (relocatable)
            --with-jit-reader-dir=/usr/lib/gdb (relocatable)
            --without-libunwind-ia64
            --with-lzma
            --with-python=/usr (relocatable)
            --without-guile
            --with-separate-debug-dir=/usr/lib/debug (relocatable)
            --without-babeltrace
  </code></pre>
  
  <p>and my computer is 32 bits, so it appears to be the correct version.</p>
  
  <p>gdb itself seems to work, e.g. I can type watch followed by an address and it will set a watchpoint; gcc and g++ work fine, and the program I am debugging will start if I run it from the command line but not from gdb.</p>
  
  <p>What other things should I check?</p>