This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Statically initialising pthread attributes in dynamic dlls.
On 23/02/2010 10:00, Andrew West wrote:
With the code I'm testing against, the exception handler isn't called
in the library and it bombs out there. :(
The dll initialisation stuff calls '_cygtls::init_exception_handler'
but it doesn't insert it because it finds it's already
there ( from test.exe I guess ), or at least it doesn't hit my break
point in '_cygtls::reset_fault' during the call
to pthread_mutexattr_init.
Further to this ( possibly instead of this ). When the code reaches this
point inside the call to pthread_mutexattr_init;
if ((*object)->magic != magic)
Shouldn't the SEH contain the cytls exception handler as the first item
in the list? I seem to have 4 things before it;
(gdb) info w32 selector
Selector $cs
<snip>
0x03b: base=0x7ffdf000 limit=0x00000fff 32-bit Data (Read/Write, Exp-up)
<snip>
(gdb) x/wx 0x7ffdf000
0x7ffdf000: 0x0022c628
(gdb) x/2wx 0x0022c628
0x22c628: 0x0022c8d4 0x7c90e920
(gdb) x/x 0x7c90e920
0x7c90e920 <strchr+275>: 0x83ec8b55
(gdb) x/2wx 0x0022c8d4
0x22c8d4: 0x0022cb7c 0x7c90e920
(gdb) x/x 0x7c90e920
0x7c90e920 <strchr+275>: 0x83ec8b55
(gdb) x/2wx 0x0022cb7c
0x22cb7c: 0x0022cbe4 0x7c90e920
(gdb) x/x 0x7c90e920
0x7c90e920 <strchr+275>: 0x83ec8b55
(gdb) x/2wx 0x0022cbe4
0x22cbe4: 0x0022ce68 0x7c839ad8
(gdb) x/x 0x7c839ad8
0x7c839ad8 <ValidateLocale+688>: 0x83ec8b55
(gdb) x/2wx 0x0022ce68
0x22ce68: 0x0022ffe0 0x61028d70
(gdb) x/x 0x61028d70
0x61028d70
<_ZN7_cygtls17handle_exceptionsEP17_EXCEPTION_RECORDP15_exception_listP8_CONTEXTPv>:
0x57e58955
(gdb) x/2wx 0x0022ce68
0x22ce68: 0x0022ffe0 0x61028d70
(gdb) x/x 0x61028d70
0x61028d70
<_ZN7_cygtls17handle_exceptionsEP17_EXCEPTION_RECORDP15_exception_listP8_CONTEXTPv>:
0x57e58955
(gdb) x/x 0x0022ffe0
0x22ffe0: 0xffffffff
No idea if I'm even in the right area with this, or am I looking at this
list in the wrong order... and should the cygtls exception handler
really be in the list twice?
Andy
--
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