gdb: unknown target exception

1

When trying to run a program using gdb I get

[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

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

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)

When I type show configuration get

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

and my computer is 32 bits, so it appears to be the correct version.

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.

What other things should I check?

exception
gdb
asked on Stack Overflow Dec 2, 2016 by Eric K

2 Answers

0

I had the same problem. I am also using x86 with eclipse mars.2 on a Vista, and by default, gdb 7.10 was downloaded by setup. I also tried all you have tried to no avail.

Lastly, I noticed the link below and upgraded gdb to 7.11 and the problem was fixed.

https://cygwin.com/ml/cygwin/2016-10/msg00243.html

answered on Stack Overflow Dec 16, 2016 by Jiryih Tsaur • edited Dec 16, 2016 by Jiryih Tsaur
0

This is a special technical exception that communicates thread name to supporting debugger (Delphi RAD Studio, Visual Mess etc.). It is convenient to look at the thread list in the debugger and understand what is going on by looking at names. Threads throw this exception and instantly catch it, doing nothing in the handler. Until recent SetThreadName introduction, it was the only common way to set thread name. SetThreadName is Unicode, but SetThreadName not widely supported yet, so many libraries use supported method. It can be IME, OLE, whatever spawns threads.

I guess, gdb is aware of neither method. Just ignore this exception.

answered on Stack Overflow Jun 24, 2019 by OCTAGRAM

User contributions licensed under CC BY-SA 3.0