This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling RegisterServiceProcess from setsid ?


On Wed, Jun 04, 2003 at 11:05:53PM -0400, Pierre A. Humblet wrote:
>At 10:53 PM 6/4/2003 -0400, Christopher Faylor wrote:
>>>- sshd: 
>>>/c: strace -o sshd.txt ./sshd
>>> 517345 [main] sshd 938013 handle_exceptions: Exception:
>STATUS_ACCESS_VIOLATION
>>> 529292 [main] sshd 938013 open_stackdumpfile: Dumping stack trace to
>SSHD.EXE.stackdump
>>> no useful info in dump.
>>
>>That's usually a sign of a bad pointer reference in a call to
>>strace_printf.  I usually debug these by starting the program in the
>>debugger and setting strace.active = 1.  Sometimes I set a breakpoint in
>>strace::hello first.
>
>It also happens under gdb. This is where I stand, enough for today.
>Any idea?

Gah.

Are you compiling without optimization?  Maybe that's required.

How about doing a:

display /i $pc
stepi

into main?  That might be instructive (to me at least).

cgf
>In dcrt0.cc
>783       if (user_data->main)
>(gdb) p __argc
>$4 = 1
>(gdb) p __argv
>$5 = (char **) 0xaf1aa8
>(gdb) s
>784         exit (user_data->main (__argc, __argv, *user_data->envptr));
>(gdb) p __argv
>$6 = (char **) 0xaf1aa8
>(gdb) p __argc
>$7 = 1
>(gdb) b main
>Breakpoint 2 at 0x403270: file sshd.c, line 804.
>(gdb) s
>main (ac=0, av=0x0) at sshd.c:804
>804     {
>Current language:  auto; currently c
>(gdb) p ac
>$8 = 0
>(gdb) s
>834             for (i = 0; i < ac; i++)
>(gdb) p ac
>$9 = 0
>(gdb) s
>
>Program received signal SIGILL, Illegal instruction.
>0x00403282 in main (ac=0, av=0x0) at sshd.c:804
>804     {
>(gdb) 
>
>Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]