From: joesoroka AT hotmail DOT com Subject: Re: Win95/98 KERNEL32 Pagefaulting 20 Jan 1999 14:32:15 -0800 Message-ID: <199901200658.WAA04893.cygnus.gnu-win32@cygnus.com> References: <36A4A8AA DOT 3E8E49B5 AT delorie DOT com> Content-Type: text/plain To: gnu-win32 AT cygnus DOT com dj delorie wrote: > > Now, at least, xterm dumps core after pagefaulting. > > If it dumps core, you should be able to use gdb to debug it too. Yeah... Okay. It took me a while to get xterm to compile on its own, but I finally did and this is as far as I can get.. CYGWIN1.DLL (symbols previously loaded) .... bunch of dlls loading ... NTDLL.DLL (symbols previously loaded) Breakpoint 1, 0x457740 in fork () (gdb) disassemble Dump of assembler code for function fork 0x457740 : jmp *0x4658e0 0x457746 : nop 0x457747 : nop End of assembler dump. (gdb) display/i $pc 1: x/i $eip 0x457740 : jmp *0x4658e0 (gdb) stepi Cannot access memory at address 0x2000000. (gdb) stepi Cannot access memory at address 0x2000000. (gdb) stepi .... same thing ad infinitum until .. (note stepi's haven't moved pc) (gdb) continue Continuing. 0 0 [main] C:\USR\USERS\JSOROKA\X11\XTERM\XTERM.EXE 1004 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 0 38949 [main] XTERM 1004 handle_exceptions: Dumping stack trace to XTERM. EXE.core .................................................. And a dialog: XTERM caused an invalid page fault in module KERNEL32.DLL at 015f:bff7a382. Registers: EAX=00000000 CS=015f EIP=bff7a382 EFLGS=00010216 EBX=005b0f68 SS=0167 ESP=025de198 EBP=025de1bc ECX=004b003c DS=0167 ESI=0000001c FS=112f EDX=004b003c ES=0167 EDI=00000078 GS=376e Bytes at CS:EIP: 89 50 04 8d 04 33 50 ff 75 08 e8 70 fd ff ff eb Stack dump: 00000078 00000000 004b000c 004b0000 005b0f68 00000040 00000000 000005b0 000005b1 025de1e4 bff7a541 004b0000 005b0f68 0000001c 00000041 00000041 ............................................ [back to gdb] warning: cygwin: signal 20 at this point, I can only ctrl-alt-del and kill xterm. If I stay out of fork and just step through spawn(), a function in xterm's main.c, I get the same page fault: 2115 if (!am_slave) { (gdb) 2117 if (pipe(pc_pipe) || pipe(cp_pipe)) (gdb) 2120 if ((screen->pid = fork ()) == -1) (gdb) 0 0 [main] C:\USR\USERS\L\X11\XTERM\XTERM.EXE 1003 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 0 9608 [main] XTERM 1003 handle_exceptions: Dumping stack trace to XTERM. EXE.core 2123 if (screen->pid == 0) { (gdb) n warning: cygwin: signal 20 But after selecting "close" in the pagefault dialog, I'm presented with the next line of source as if nothing happened. I step along until... 1485 if(screen->TekEmu) { (gdb) 1488 VTRun(); (gdb) at which point an xterm window actually opens up. I can type and cursor around this blank little window, but there is nothing "to" it, no shell. I'm not familiar at all with gdb, but I'm assuming the reason I get "Cannot access memory at address 0x2000000." is because thats a windows dll there.. I'm also assuming this is what the "WinXX w/ Debug Symbols" CDs from microsoft are for. ANyways, the other thing is.. I see xterm trying to open /dev/tty's all over the place. I never saw anything in any docs about setting up /dev/tty's with cygwin.. I kind of hoped it was just "taken care" of. Whaddya think? Joe SOroka - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".