public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gdb : Exception in SetThreadName(unsigned long, char const*) () from /usr/bin/cygwin1.dll
@ 2016-09-09  4:15 Reto Huber
  2016-09-10 11:40 ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: Reto Huber @ 2016-09-09  4:15 UTC (permalink / raw)
  To: cygwin

Hi

I am using cygwin for quite a while. Yesterday I did update.
Everything seemed to work smooth. Today I figured out that gdb does no
longer work debugging my project. Even a simple "Hello World" can not
be debugged anymore. The executable itself runs ok. Here the example


rh@pc /d/gdbTest
$ cat main.cpp
#include <stdio.h>

int main(void)
{
  printf("Hello World\n");
  return 0;
}


rh@pc /d/gdbTest
$ g++ -std=gnu++11 -g -O0 -pipe -Wall -Wno-unused-local-typedefs
-Wpointer-arith -Woverloaded-virtual -MMD -MP main.cpp -o main.exe


rh@pc /d/gdbTest
$ ./main.exe
Hello World


rh@pc /d/gdbTest
$ gdb main.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main.exe...done.
(gdb) r
Starting program: /d/gdbTest/main.exe
[New Thread 11608.0x2e20]
[New Thread 11608.0x1b3c]
gdb: unknown target exception 0x406d1388 at 0x7639c54f

Program received signal ?, Unknown signal.
0x7639c54f in RaiseException () from /c/Windows/syswow64/KERNELBASE.dll
(gdb) bt
#0  0x7639c54f in RaiseException () from /c/Windows/syswow64/KERNELBASE.dll
#1  0x61081614 in SetThreadName(unsigned long, char const*) () from
/usr/bin/cygwin1.dll
#2  0x61004a6b in cygthread::create() () from /usr/bin/cygwin1.dll
#3  0x61004b5f in cygthread::async_create(unsigned long) () from
/usr/bin/cygwin1.dll
#4  0x77e154f6 in ntdll!RtlRemoveVectoredExceptionHandler () from
/c/Windows/SysWOW64/ntdll.dll
#5  0x77dc005d in ntdll!KiUserApcDispatcher () from
/c/Windows/SysWOW64/ntdll.dll
#6  0x61004b50 in cygthread::create() () from /usr/bin/cygwin1.dll
#7  0x75dbb2b7 in ?? ()
#8  0x77ea021c in ntdll!NlsAnsiCodePage () from /c/Windows/SysWOW64/ntdll.dll
#9  0x007eb720 in ?? ()
#10 0x77dda1c9 in ntdll!LdrInitializeThunk () from /c/Windows/SysWOW64/ntdll.dll
#11 0x00000000 in ?? ()
(gdb)

Versions: (Downloaded 7. Sept 2016)
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
g++ (GCC) 5.4.0
cygwin1.dll: File Version 2.6.0, APIVersion 0.304

The versions before the update were: (Downloaded 27. July 2016)
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
g++ (GCC) 5.4.0
cygwin1.dll: File Version 2.5.2, APIVersion 0.297

If I run the same procedure as mentioned above using the version from
July 27th it works.

Can you give me a hint how I can fix it? Can anyone reproduce the issue?

Thanks in advance for help
Reto

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb : Exception in SetThreadName(unsigned long, char const*) () from /usr/bin/cygwin1.dll
  2016-09-09  4:15 gdb : Exception in SetThreadName(unsigned long, char const*) () from /usr/bin/cygwin1.dll Reto Huber
@ 2016-09-10 11:40 ` Jon Turney
  2016-09-12  6:01   ` Reto
  2016-10-20 14:08   ` Jon Turney
  0 siblings, 2 replies; 4+ messages in thread
From: Jon Turney @ 2016-09-10 11:40 UTC (permalink / raw)
  To: cygwin; +Cc: Reto Huber

On 09/09/2016 05:15, Reto Huber wrote:
> I am using cygwin for quite a while. Yesterday I did update.
> Everything seemed to work smooth. Today I figured out that gdb does no
> longer work debugging my project. Even a simple "Hello World" can not
> be debugged anymore. The executable itself runs ok. Here the example

Thanks for reporting this problem, and the test case.

> gdb: unknown target exception 0x406d1388 at 0x7639c54f
>
> Program received signal ?, Unknown signal.

This is related to the thread name support added in 2.6.0

The exception used to pass the thread name to the debugger is supposed 
to be caught internally if the debugger doesn't handle it, but this 
doesn't seem to be working correctly on x86.

> Can you give me a hint how I can fix it? Can anyone reproduce the issue?

At the moment, the workaround would be to downgrade to Cygwin 2.5.2, or 
to update to the gdb 7.11.1-1 test release (which has explicit handling 
for these thread naming exceptions)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb : Exception in SetThreadName(unsigned long, char const*) () from /usr/bin/cygwin1.dll
  2016-09-10 11:40 ` Jon Turney
@ 2016-09-12  6:01   ` Reto
  2016-10-20 14:08   ` Jon Turney
  1 sibling, 0 replies; 4+ messages in thread
From: Reto @ 2016-09-12  6:01 UTC (permalink / raw)
  To: cygwin

Hi Jon

Thanks a lot for your valuable help. I did update gdb to version
7.11.1-1 test release. Now it works fine.

Have a nice day,
Reto

On Sat, Sep 10, 2016 at 1:39 PM, Jon Turney <jon.turney@dronecode.org.uk> wrote:
> On 09/09/2016 05:15, Reto Huber wrote:
>>
>> I am using cygwin for quite a while. Yesterday I did update.
>> Everything seemed to work smooth. Today I figured out that gdb does no
>> longer work debugging my project. Even a simple "Hello World" can not
>> be debugged anymore. The executable itself runs ok. Here the example
>
>
> Thanks for reporting this problem, and the test case.
>
>> gdb: unknown target exception 0x406d1388 at 0x7639c54f
>>
>> Program received signal ?, Unknown signal.
>
>
> This is related to the thread name support added in 2.6.0
>
> The exception used to pass the thread name to the debugger is supposed to be
> caught internally if the debugger doesn't handle it, but this doesn't seem
> to be working correctly on x86.
>
>> Can you give me a hint how I can fix it? Can anyone reproduce the issue?
>
>
> At the moment, the workaround would be to downgrade to Cygwin 2.5.2, or to
> update to the gdb 7.11.1-1 test release (which has explicit handling for
> these thread naming exceptions)
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb : Exception in SetThreadName(unsigned long, char const*) () from /usr/bin/cygwin1.dll
  2016-09-10 11:40 ` Jon Turney
  2016-09-12  6:01   ` Reto
@ 2016-10-20 14:08   ` Jon Turney
  1 sibling, 0 replies; 4+ messages in thread
From: Jon Turney @ 2016-10-20 14:08 UTC (permalink / raw)
  To: cygwin

On 10/09/2016 12:39, Jon Turney wrote:
> On 09/09/2016 05:15, Reto Huber wrote:
>> I am using cygwin for quite a while. Yesterday I did update.
>> Everything seemed to work smooth. Today I figured out that gdb does no
>> longer work debugging my project. Even a simple "Hello World" can not
>> be debugged anymore. The executable itself runs ok. Here the example
>
> Thanks for reporting this problem, and the test case.
>
>> gdb: unknown target exception 0x406d1388 at 0x7639c54f
>>
>> Program received signal ?, Unknown signal.
>
> This is related to the thread name support added in 2.6.0
>
> The exception used to pass the thread name to the debugger is supposed
> to be caught internally if the debugger doesn't handle it, but this
> doesn't seem to be working correctly on x86.

I have applied a fix for this.

>> Can you give me a hint how I can fix it? Can anyone reproduce the issue?
>
> At the moment, the workaround would be to downgrade to Cygwin 2.5.2, or
> to update to the gdb 7.11.1-1 test release (which has explicit handling
> for these thread naming exceptions)

So the combination of x86, gdb 7.10.1-1, and Cygwin snapshot 2016-10-20 
or later should also work.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-20 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09  4:15 gdb : Exception in SetThreadName(unsigned long, char const*) () from /usr/bin/cygwin1.dll Reto Huber
2016-09-10 11:40 ` Jon Turney
2016-09-12  6:01   ` Reto
2016-10-20 14:08   ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).