in reply to Can't trigger system debugger to dump core when Cygwin's Perl launches program with backticks
I have registered a perl script as crash handler with the operating system
The problem: When I use Cygwin’s Perl implementation, the program crash never triggers the crash handler. My suspicion is that Perl is catching the problem and silently dropping it. All works fine with a Perl from ActiveState.So when crasher is launched from AS Perl, does the crash handler get called? The 2 paragraphs are contradictory.
......................
Also, if I start Crasher.exe directly in Cygwin’s shell, the crash handler is not called; neither is it called if started via backticks in either Cygwin or ActriveState Perl.
The event handle passed on the command line to the debugger is to keep around the crashed process. When that event handle becomes signaled, UnhandledExceptionFilter cleans up its resources and returns EXCEPTION_CONTINUE_SEARCH. I'll guess otherwise the crashed process will exit before the new C debugger process can register itself with Windows and get a handle to the crashed process to keep it alive.ntdll.dll!_NtRaiseHardError@24() + 0x12 bytes kernel32.dll!_UnhandledExceptionFilter@4() + 0x51a bytes kernel32.dll!_BaseProcessStart@4() + 0x29a68 bytes kernel32.dll!__except_handler3() + 0x61 bytes ntdll.dll!ExecuteHandler2@20() + 0x26 bytes ntdll.dll!ExecuteHandler@20() + 0x24 bytes ntdll.dll!_KiUserExceptionDispatcher@8() + 0xe bytes msvcrt.dll!_memmove() + 0x130 bytes > perl512.dll!Perl_sv_setpvn(interpreter * my_perl=0x002c6eac, sv * + const sv=0x002ca9f4, const char * const ptr=0x00000006, const unsign +ed int len=5) Line 4345 C perl512.dll!Perl_newSVpvn_flags(interpreter * my_perl=0x002c6eac, + const char * const s=0x00000006, const unsigned int len=5, const uns +igned long flags=524288) Line 7711 C perl512.dll!S_unpack_rec(interpreter * my_perl=0x002c6eac, tempsy +m * symptr=0x0245fa8c, const char * s=0x03b95e00, const char * strbeg +=0x03b95dfc, const char * strend=0x03b95e04, const char * * new_s=0x0 +0000000) Line 2051 + 0x15 bytes C perl512.dll!Perl_unpackstring(interpreter * my_perl=0x002c6eac, c +onst char * pat=0x03b9616c, const char * patend=0x03b96170, const cha +r * s=0x03b95dfc, const char * strend=0x03b95e04, unsigned long flags +=16) Line 1221 + 0x2d bytes C perl512.dll!Perl_pp_unpack(interpreter * my_perl=0x00000002) Lin +e 2284 C perl512.dll!Perl_runops_standard(interpreter * my_perl=0x002c6eac +) Line 38 + 0xc bytes C perl512.dll!S_run_body(interpreter * my_perl=0x002c6eac, long old +scope=1) Line 2309 + 0x7 bytes C perl512.dll!perl_run(interpreter * my_perl=0x002c6eac) Line 2234 + + 0xa bytes C perl512.dll!RunPerl(int argc=3, char * * argv=0x002c2d50, char * +* env=0x012c30b8) Line 270 + 0x6 bytes C++ perl.exe!main(int argc=3, char * * argv=0x002c2d50, char * * env= +0x002c30b8) Line 22 + 0x12 bytes C perl.exe!_mainCRTStartup() + 0xe3 bytes kernel32.dll!_BaseProcessStart@4() + 0x28 bytes
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't trigger system debugger to dump core when Cygwin's Perl launches program with backticks
by jimcant (Initiate) on Sep 17, 2013 at 19:45 UTC |