Fun projects

David Fraser davidf at
Sat Nov 9 08:40:13 CST 2002

Sylvain Petreolle wrote:

>This is what I did.
>the gcc included in dev-c++ is a statically linked that doesn't need
>the cygwin1.dll to run.
>But that I looked particularily at compiling cygwin under wine.
>Using the cygwin under is difficult for the moment, as bash and sh
>both refuse to run today.
>>I presume this is possible, although the other interesting approach
>>would be
>>to run the gcc binary from mingw/cygin under wine itself. I saw that
>>got it running recently on the newsgroup; see 
>>Note: I haven't actually done this. These are just ideas :-)
>Thanks for taking time to answer.
>Do You Yahoo!? -- Une adresse gratuite et en français !
>Yahoo! Mail :
Yes, I get the same results. The reason seems to be the gcc with dev-c++ is
the mingw gcc. My mingw gcc seems to run fine under wine (haven't actually
tried to compile anything, just asked it for help) but any of the cygwin 
give a problem, which seems to be on startup when loading the cygwin dll.
For example, here is the output from the most minimal example, true.exe 
seem very similar - by the way, I have included the cygwin directory in 
my path
so it should get the dll.) Not sure if it's useful. This is running of 
my shared Windows


fixme:console:SetConsoleCtrlHandler (0x610135c0,0) - no error checking 
or testing yet
fixme:console:SetConsoleCtrlHandler (0x610135c0,1) - no error checking 
or testing yet
err:dosfs:DOSFS_CreateCommPort Couldn't open device '/dev/ttyS0' ! 
(check permissions)
fixme:dosfs:DOSFS_OpenDevice device open L"COM1" not supported (yet)
err:file:CreateFileW Couldn't open device L"com1"!
     67 [main] true -134679520 handle_exceptions: Exception: 
Exception: STATUS_STACK_OVERFLOW at eip=61012060
eax=42240A44 ebx=42242FFC ecx=422408F4 edx=00000023 esi=40490000 
ebp=422408F4 esp=422408BC program=C:\cygwin\bin\true.exe
cs=0023 ds=002B es=002B fs=008F gs=0000 ss=002B
Stack trace:
Frame     Function  Args
  11275 [main] true -134679520 handle_exceptions: Exception: 
  12247 [main] true -134679520 handle_exceptions: Error while dumping 
state (probably corrupted stack)
wine: Unhandled exception, starting debugger...
Could not stat /mnt/fd0 (No such file or directory), ignoring drive A:
WineDbg starting on pid 8070be0
Loaded debug information from ELF 'wine' (0x00000000)
Breakpoint 1 at 0x4000bd00 (_end+0x37faf5d8)
Loaded debug information from ELF '/usr/local/lib/' 
Loaded debug information from ELF '/usr/local/lib/' (0x4010f000)
Loaded debug information from ELF '/usr/local/lib/' 
No debug information in ELF '/lib/i686/' (0x40227000)
No debug information in ELF '/lib/' (0x40249000)
No debug information in ELF '/lib/' (0x40000000)
No debug information in ELF '/lib/' (0x4024d000)
Loaded debug information from ELF '/usr/local/lib/wine/' 
Loaded debug information from ELF '/usr/local/lib/wine/' 
No debug information in 32bit DLL 'C:\cygwin\bin\true.exe' (0x00400000)
No debug information in 32bit DLL 'C:\WINNT\SYSTEM32\NTDLL.DLL' (0x40050000)
No debug information in 32bit DLL 'C:\WINNT\SYSTEM32\KERNEL32.DLL' 
No debug information in 32bit DLL 'C:\CYGWIN\BIN\CYGWIN1.DLL' (0x61000000)
No debug information in 32bit DLL 'C:\WINNT\SYSTEM32\ADVAPI32.DLL' 
No debug information in 32bit DLL 'C:\WINNT\SYSTEM32\PSAPI.DLL' (0x690a0000)
Unhandled exception: page fault on read access to 0x0000010b in 32-bit 
code (0x690a10df).
In 32-bit mode.
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0000
 EIP:690a10df ESP:4223f694 EBP:4223f694 EFLAGS:00010246(  R- 00  I  Z- -P1 )
 EAX:00000103 EBX:400f4e84 ECX:400f31a4 EDX:400f31a8
 ESI:690a10bc EDI:690a0000
Stack dump:
0x4223f694 (NTDLL.DLL.memcpy+0x1bcdb4):  4223f6bc 400807a2 690a0000 00000001
0x4223f6a4 (NTDLL.DLL.memcpy+0x1bcdc4):  00000000 400f4c1a 00000001 400f4e84
0x4223f6b4 (NTDLL.DLL.memcpy+0x1bcdd4):  40263f58 00000002 4223f6e0 4007d40f
0x4223f6c4 (NTDLL.DLL.memcpy+0x1bcde4):  690a0000 00000001 00000000 400f4bf4
0x4223f6d4 (NTDLL.DLL.memcpy+0x1bcdf4):  400f4e84 40263f58 00000002 4223f708
0x4223f6e4 (NTDLL.DLL.memcpy+0x1bce04):  4007d531 40263f58 00000001 00000000
0x4223f6f4 (NTDLL.DLL.memcpy+0x1bce14):

0011: sel=008f base=4010ba20 limit=00000fff 32-bit rw-
=>0 0x690a10df (PSAPI.DLL.EntryPoint+0x23 in 
C:\WINNT\SYSTEM32\PSAPI.DLL) (ebp=4223f694)
  1 0x400807a2 (PE_InitDLL+0x6e(module=0x690a0000, type=0x1, 
lpReserved=0x0) [pe_image.c:628] in (ebp=4223f6bc)
  2 0x4007d40f (MODULE_InitDLL+0x93(wm=0x40263f58, type=0x1, 
lpReserved=0x0) [module.c:159] in (ebp=4223f6e0)
  3 0x4007d531 (MODULE_DllProcessAttach+0xe1(wm=0x40263f58, 
lpReserved=0x0) [module.c:231] in (ebp=4223f708)
  4 0x4007ea1b (LoadLibraryExA+0x113(libname=0x610d4010, hfile=0x0, 
flags=0x0) [module.c:1132] in (ebp=4223f828)
  5 0x4007f04c (LoadLibraryA+0x1c(libname=0x610d4010) [module.c:1354] in (ebp=4223f840)
  6 0x610012d7 (CYGWIN1.DLL.__assert+0x247 in C:\CYGWIN\BIN\CYGWIN1.DLL) 
  7 0x610d500c (CYGWIN1.DLL./127+0xc in C:\CYGWIN\BIN\CYGWIN1.DLL) 
  8 0x6105167d (CYGWIN1.DLL.cygwin32_split_path+0x93d in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=4223f9a4)
  9 0x610079ef (CYGWIN1.DLL.__main+0x2bf in C:\CYGWIN\BIN\CYGWIN1.DLL) 
  10 0x61013fce (CYGWIN1.DLL.cygwin_stackdump+0x25ee in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=4223fa04)
  11 0x6101211b (CYGWIN1.DLL.cygwin_stackdump+0x73b in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=4223fa44)
  12 0x400c16bf (EXC_CallHandler+0x6f(record=0x4223fb18, 
frame=0x44252dc4, context=0x4223fb94, dispatcher=0x4223faa8, 
handler=0x61011ed0, nested_handler=0x400c15f8) [exception.c:117] in (ebp=4223fa78)
  13 0x400c19b8 (EXC_RtlRaiseException+0x110(rec=0x4223fb18, 
context=0x4223fb94) [exception.c:214] in (ebp=4223fb08)
  14 0x400cb3c4 (do_segv+0x188(context=0x4223fb94, trap_code=0xe, 
cr2=0x8, err_code=0x4) [signal_i386.c:798] in 
  15 0x400cb7ba (segv_handler+0x2a(__signal=0xb, __context=0x0) 
[signal_i386.c:986] in (ebp=4223fe6c)
  16 0x42029098 (NTDLL.DLL.toupper+0x5f28) (ebp=42240154)
  17 0x61011941 (CYGWIN1.DLL._strerror+0x1631 in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=42240174)
  18 0x6101210d (CYGWIN1.DLL.cygwin_stackdump+0x72d in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=422401b4)
  19 0x400c16bf (EXC_CallHandler+0x6f(record=0x42240288, 
frame=0x44252dc4, context=0x42240304, dispatcher=0x42240218, 
handler=0x61011ed0, nested_handler=0x400c15f8) [exception.c:117] in (ebp=422401e8)
  20 0x400c19b8 (EXC_RtlRaiseException+0x110(rec=0x42240288, 
context=0x42240304) [exception.c:214] in (ebp=42240278)
  21 0x400cb3c4 (do_segv+0x188(context=0x42240304, trap_code=0xe, 
cr2=0x42242ffc, err_code=0x4) [signal_i386.c:798] in 
  22 0x400cb7ba (segv_handler+0x2a(__signal=0xb, __context=0x0) 
[signal_i386.c:986] in (ebp=422405dc)
  23 0x42029098 (NTDLL.DLL.toupper+0x5f28) (ebp=422408f4)
  24 0x400c16bf (EXC_CallHandler+0x6f(record=0x422409c8, 
frame=0x44252dc4, context=0x42240a44, dispatcher=0x42240958, 
handler=0x61011ed0, nested_handler=0x400c15f8) [exception.c:117] in (ebp=42240928)
  25 0x400c19b8 (EXC_RtlRaiseException+0x110(rec=0x422409c8, 
context=0x42240a44) [exception.c:214] in (ebp=422409b8)
  26 0x400cb3c4 (do_segv+0x188(context=0x42240a44, trap_code=0xe, 
cr2=0x104, err_code=0x4) [signal_i386.c:798] in 
  27 0x400cb7ba (segv_handler+0x2a(__signal=0xb, __context=0x0) 
[signal_i386.c:986] in (ebp=42240d1c)
  28 0x42029098 (NTDLL.DLL.toupper+0x5f28) (ebp=442528bc)
  29 0x61028668 (CYGWIN1.DLL.cygwin32_internal+0x13c18 in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=4425293c)
  30 0x6102845d (CYGWIN1.DLL.cygwin32_internal+0x13a0d in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=4425295c)
  31 0x6100aa5f (CYGWIN1.DLL.cygwin_attach_handle_to_fd+0x36f in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=44252d3c)
  32 0x6100a509 (CYGWIN1.DLL.dlfork+0x589 in C:\CYGWIN\BIN\CYGWIN1.DLL) 
  33 0x61006d3c (CYGWIN1.DLL.__assert+0x5cac in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=44252ddc)
  34 0x6100753d (CYGWIN1.DLL._dll_crt0 at 0+0x1bd in 
C:\CYGWIN\BIN\CYGWIN1.DLL) (ebp=44252e2c)
  35 0x004036c3 (true.exe..text+0x26c3 in C:\cygwin\bin\true.exe) 
  36 0x0040103d (true.exe..text+0x3d in C:\cygwin\bin\true.exe) 
  37 0x400b4360 (start_process+0x258 [process.c:564] in 
  38 0x400b8533 (call_on_thread_stack+0x23(func=0x400b4108) 
[sysdeps.c:112] in (ebp=44252ff4)
  39 0x400b86cc (SYSDEPS_CallOnStack+0x14 in (ebp=00000000)

0x690a10df (PSAPI.DLL.EntryPoint+0x23 in C:\WINNT\SYSTEM32\PSAPI.DLL): 
testb    $0x2,0x8(%eax)
Address                 Module  Name
0x00400000-00406400     (PE)    C:\cygwin\bin\true.exe
0x40050000-40052000     (PE)    C:\WINNT\SYSTEM32\NTDLL.DLL
0x403d0000-403d2000     (PE)    C:\WINNT\SYSTEM32\KERNEL32.DLL
0x40460000-40462000     (PE)    C:\WINNT\SYSTEM32\ADVAPI32.DLL
0x61000000-61131200     (PE)    C:\CYGWIN\BIN\CYGWIN1.DLL
0x690a0000-690aa400     (PE)    C:\WINNT\SYSTEM32\PSAPI.DLL
process  tid      prio
08070be0 (D) C:\cygwin\bin\true.exe
        08090280    0
        0808fef0   15 <==
        0808e628    0
WineDbg terminated on pid 8070be0

More information about the wine-devel mailing list