You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(63) |
Sep
(78) |
Oct
(111) |
Nov
(104) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(69) |
Feb
(68) |
Mar
(23) |
Apr
(61) |
May
(56) |
Jun
(122) |
Jul
(82) |
Aug
(44) |
Sep
(63) |
Oct
(73) |
Nov
(77) |
Dec
(102) |
2008 |
Jan
(34) |
Feb
(51) |
Mar
(39) |
Apr
(43) |
May
(8) |
Jun
(59) |
Jul
(69) |
Aug
(97) |
Sep
(140) |
Oct
(72) |
Nov
(37) |
Dec
(35) |
2009 |
Jan
(70) |
Feb
(104) |
Mar
(42) |
Apr
(121) |
May
(161) |
Jun
(109) |
Jul
(90) |
Aug
(85) |
Sep
(104) |
Oct
(59) |
Nov
(76) |
Dec
(145) |
2010 |
Jan
(123) |
Feb
(45) |
Mar
(37) |
Apr
(9) |
May
|
Jun
(5) |
Jul
(22) |
Aug
|
Sep
(4) |
Oct
(5) |
Nov
(2) |
Dec
(83) |
2011 |
Jan
(19) |
Feb
(33) |
Mar
(14) |
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(8) |
Dec
(8) |
2012 |
Jan
(2) |
Feb
(4) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Pavel P. <pa...@su...> - 2010-03-15 00:25:14
|
> From: SiliconBear [mailto:ch...@ec...] > > Dear Experts, > > I'm trying to port a simple UDP application, which ran on Linux and > Symbian, > to Windows Mobile 6.5. I was going to do a fresh MSVC project, but then > ran > into cegcc, and gave it a try. I have to say, cegcc saves me a lot of > efforts. > However, I ran into an issue with missing UDP packets, details are > given below. > > I use arm-ming32ce on Linux, and have revised my code to get it > compiled. More > specifically, I commented out a few BSD socket headers, and add the > following > includes: > #define __USE_WIN32_SOCKETS > #include<winsock.h> > #include<windows.h> > #include<string.h> > #include<process.h> > #include<stdio.h> > > I link the object files using the options: > -static -static-libgcc -lws2 > > My application uses sendto() and recvfrom() to communicate with > multiple UDP > servers over WiFi. And I can see some UDP packets showing up at the > server > side using wireshark. However, I have noticed that many packets are not > actually sent even though sendto() returns a nonzero value. Similar > thing > happens to recvfrom(): most of the time I receive only one or two > incoming UDP > packets. > > I wonder whether I made any newbie mistakes? Please advise, and thanks > in advance. > > Best Regards, > Cheng > > That really doesn't have anything to do with cegcc itself, that code you are trying to port most likely needs some porting to make it work on windows (did you forget wsastartup?). In any case, for every socket call check for error returns (or wsagetlasterror) and in case of a error check corresponding error description: http://lmgtfy.com/?q=windows+error+codes or winapi description: http://lmgtfy.com/?q=sendto+wince+site%3Amicrosoft.com |
From: Pavel P. <pa...@su...> - 2010-03-15 00:16:12
|
> On Sun, 2010-03-14 at 04:25 -0400, Pavel Pavlov wrote: > > Sorry, I should have give more info. Off course default vanilla armv4 > will work, > > but I need to enable armv7 + neon compilation. Currently, It won't > compile the > > code: error, unsupported ins for this arch. > > arm-mingw32ce-gcc --target-help mentions a lot of options. That's a standard switch that's mentioned in arm-mingw32ce-gcc --help. It doesn't mention anything on how to get list of supported target CPU's or arch's. > > > By the way, I have a few minor local changes in my copy related to > coredll.dll vs coredll (see attachement). > > I looked in my mailing archive but I can't find info about this - but I > seem to remember that this has been brought up before. > > What exactly is the problem this solves, and why haven't we applied > this > fix before ? Well, for some reason it was all written as COREDLL instead of coredll.dll. That means that many binaries are linked to COREDLL (without .dll suffix). There is no such behavior with ms tools, they always link to coredll.dll. Moreover, as far as I remember the way loader works is this: if there is no COREDLL it will try to load coredll.exe then coredll.dll, which means that if somebody "maliciously" creates a \windows\coredll.exe then everything that links to coredll will fail to load. I didn't very that though, still I don't see a reason to link to coredll instead of coredll.dll (plus in the list of dependencies (depends.exe) I don't see multiple dependencies on coredll and coredll.dll at the same time. |
From: SiliconBear <ch...@ec...> - 2010-03-14 20:51:01
|
Dear Experts, I'm trying to port a simple UDP application, which ran on Linux and Symbian, to Windows Mobile 6.5. I was going to do a fresh MSVC project, but then ran into cegcc, and gave it a try. I have to say, cegcc saves me a lot of efforts. However, I ran into an issue with missing UDP packets, details are given below. I use arm-ming32ce on Linux, and have revised my code to get it compiled. More specifically, I commented out a few BSD socket headers, and add the following includes: #define __USE_WIN32_SOCKETS #include<winsock.h> #include<windows.h> #include<string.h> #include<process.h> #include<stdio.h> I link the object files using the options: -static -static-libgcc -lws2 My application uses sendto() and recvfrom() to communicate with multiple UDP servers over WiFi. And I can see some UDP packets showing up at the server side using wireshark. However, I have noticed that many packets are not actually sent even though sendto() returns a nonzero value. Similar thing happens to recvfrom(): most of the time I receive only one or two incoming UDP packets. I wonder whether I made any newbie mistakes? Please advise, and thanks in advance. Best Regards, Cheng |
From: Danny B. <dan...@sc...> - 2010-03-14 11:05:48
|
On Sun, 2010-03-14 at 04:25 -0400, Pavel Pavlov wrote: > Sorry, I should have give more info. Off course default vanilla armv4 will work, > but I need to enable armv7 + neon compilation. Currently, It won't compile the > code: error, unsupported ins for this arch. arm-mingw32ce-gcc --target-help mentions a lot of options. > By the way, I have a few minor local changes in my copy related to coredll.dll vs coredll (see attachement). I looked in my mailing archive but I can't find info about this - but I seem to remember that this has been brought up before. What exactly is the problem this solves, and why haven't we applied this fix before ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Pavel P. <pa...@su...> - 2010-03-14 08:25:17
|
> On Sun, 2010-03-14 at 03:22 -0400, Pavel Pavlov wrote: > > > shouldn't the version of _WIN32_WCE be tested ? > > > > > > Well, wince sdk from ms doesn't have any tests, msdn says that the > api is available from ce.net 4.1 so probably that should be tested > then. > > Just applied a fix. > > > Guys, just a side note... I need to build for qualcom's snapdragon > but I have no idea what switches I need to use to enable suitable arm > version. Is there a magic combination to make cegcc printout list of > available target -mcpu and -march switches? Right now I go to cegcc > sources and see list of defined cpu in the source code and try using > them, but nothing works for me (invalid switch). I'll try to rebuild > latest version and I'll see if I can use that. I tried to use it a > while ago, but my binaries wouldn't run if built by that version of > cegcc (I'm mostly doing some voice/video stuff and ffmpeg) > > Not sure what you're asking. It's an ARM chip so the standard settings > should just work. You probably know that. So you must be asking for > something specific, but what ? Sorry, I should have give more info. Off course default vanilla armv4 will work, but I need to enable armv7 + neon compilation. Currently, It won't compile the code: error, unsupported ins for this arch. By the way, I have a few minor local changes in my copy related to coredll.dll vs coredll (see attachement). |
From: Danny B. <dan...@sc...> - 2010-03-14 08:11:08
|
On Sun, 2010-03-14 at 03:22 -0400, Pavel Pavlov wrote: > > shouldn't the version of _WIN32_WCE be tested ? > > > Well, wince sdk from ms doesn't have any tests, msdn says that the api is available from ce.net 4.1 so probably that should be tested then. Just applied a fix. > Guys, just a side note... I need to build for qualcom's snapdragon but I have no idea what switches I need to use to enable suitable arm version. Is there a magic combination to make cegcc printout list of available target -mcpu and -march switches? Right now I go to cegcc sources and see list of defined cpu in the source code and try using them, but nothing works for me (invalid switch). I'll try to rebuild latest version and I'll see if I can use that. I tried to use it a while ago, but my binaries wouldn't run if built by that version of cegcc (I'm mostly doing some voice/video stuff and ffmpeg) Not sure what you're asking. It's an ARM chip so the standard settings should just work. You probably know that. So you must be asking for something specific, but what ? The gcc mailing list(s) may also be a good place to ask this question .. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Vincent T. <vt...@un...> - 2010-03-14 07:55:52
|
Hey, So, is there some fixes that has been pushed in svn about that limits.h problem ? Vincent Torri |
From: Pavel P. <pa...@su...> - 2010-03-14 07:22:35
|
> On Sat, 13 Mar 2010, Danny Backx wrote: > > > On Tue, 2010-03-09 at 01:41 -0500, Pavel Pavlov wrote: > >> For some reason in cegcc sdk some functions ifdefed this way: > >> > >> #if (_WIN32_WINNT >= 0x0501) > >> void WSAAPI freeaddrinfo (struct addrinfo*); > >> int WSAAPI getaddrinfo (const char*,const char*,const struct > addrinfo*, > >> struct addrinfo**); > >> int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD, > >> char*,DWORD,int); > >> ... > >> > >> > >> Even though these are awailable as of Windows CE .NET 4.1 and later: > http://msdn.microsoft.com/en-us/library/ms910263.aspx > >> Mobile 6 sdk doesn't have any ifdef's around them also, so I think > this header needs to be modified. > > > > Is it just that chunk that needs fixing ? Then I could change to > > > > #if (_WIN32_WINNT >= 0x0501) || defined(_WIN32_WCE) > > shouldn't the version of _WIN32_WCE be tested ? Well, wince sdk from ms doesn't have any tests, msdn says that the api is available from ce.net 4.1 so probably that should be tested then. Guys, just a side note... I need to build for qualcom's snapdragon but I have no idea what switches I need to use to enable suitable arm version. Is there a magic combination to make cegcc printout list of available target -mcpu and -march switches? Right now I go to cegcc sources and see list of defined cpu in the source code and try using them, but nothing works for me (invalid switch). I'll try to rebuild latest version and I'll see if I can use that. I tried to use it a while ago, but my binaries wouldn't run if built by that version of cegcc (I'm mostly doing some voice/video stuff and ffmpeg) |
From: Vincent T. <vt...@un...> - 2010-03-13 08:55:05
|
On Sat, 13 Mar 2010, Danny Backx wrote: > On Tue, 2010-03-09 at 01:41 -0500, Pavel Pavlov wrote: >> For some reason in cegcc sdk some functions ifdefed this way: >> >> #if (_WIN32_WINNT >= 0x0501) >> void WSAAPI freeaddrinfo (struct addrinfo*); >> int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*, >> struct addrinfo**); >> int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD, >> char*,DWORD,int); >> ... >> >> >> Even though these are awailable as of Windows CE .NET 4.1 and later: http://msdn.microsoft.com/en-us/library/ms910263.aspx >> Mobile 6 sdk doesn't have any ifdef's around them also, so I think this header needs to be modified. > > Is it just that chunk that needs fixing ? Then I could change to > > #if (_WIN32_WINNT >= 0x0501) || defined(_WIN32_WCE) shouldn't the version of _WIN32_WCE be tested ? Vincent Torri > > Danny > -- > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Cegcc-devel mailing list > Ceg...@li... > https://lists.sourceforge.net/lists/listinfo/cegcc-devel > > |
From: Danny B. <dan...@sc...> - 2010-03-13 08:51:34
|
On Tue, 2010-03-09 at 01:41 -0500, Pavel Pavlov wrote: > For some reason in cegcc sdk some functions ifdefed this way: > > #if (_WIN32_WINNT >= 0x0501) > void WSAAPI freeaddrinfo (struct addrinfo*); > int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*, > struct addrinfo**); > int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD, > char*,DWORD,int); > ... > > > Even though these are awailable as of Windows CE .NET 4.1 and later: http://msdn.microsoft.com/en-us/library/ms910263.aspx > Mobile 6 sdk doesn't have any ifdef's around them also, so I think this header needs to be modified. Is it just that chunk that needs fixing ? Then I could change to #if (_WIN32_WINNT >= 0x0501) || defined(_WIN32_WCE) Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-03-13 08:46:43
|
On Wed, 2010-03-10 at 21:15 +0100, Danny Backx wrote: > Meaning, I think, that it does indeed crash in that statement. The > double "ldr r3, [r3]" seems odd. Even more odd is that the code in > a/t.dll.objdump is different : it looks exactly the same except only one > of these "ldr r3, [r3]" instructions. > > Trying to figure out which one is correct, and how to debug at the > assembler level :-( It would appear that in this sample program, the crash is legitimate because - yet again - an invalid pointer is read. The value of 0x16342b8 which is in r3 is not a valid pointer. In the second debugging session below I dug deeper and fixed the value of r3 which executing, which made the program work well. I'll try to find the cause of this now... Danny pavilion: {294} arm-mingw32ce-gdb main.exe GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-mingw32ce"... (gdb) target remote ipaq:9999 Remote debugging using ipaq:9999 [New Thread 616578450] Error while mapping shared library sections: coredll.dll.0409.mui: No such file or directory. Error while mapping shared library sections: coredll.dll: No such file or directory. Reading symbols from /home/danny/simple/wince/t.dll...done. Loaded symbols for t.dll Reading symbols from /home/danny/simple/wince/l.dll...done. Loaded symbols for l.dll Symbol file not found for coredll.dll.0409.mui Symbol file not found for coredll.dll WinMainCRTStartup (hInst=0x254a42f6, hPrevInst=0x0, lpCmdLine=0x2211fed8, nCmdShow=5) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:35 35 { (gdb) info share >From To Syms Read Shared Object Library 0x01571000 0x01574064 Yes t.dll 0x01581000 0x01584068 Yes l.dll No coredll.dll.0409.mui No coredll.dll (gdb) l 30 * This function is called from the entry point for all programs. 31 */ 32 void 33 WinMainCRTStartup (HINSTANCE hInst, HINSTANCE hPrevInst, 34 LPWSTR lpCmdLine, int nCmdShow) 35 { 36 int nRet; 37 38 /* 39 * Initialize floating point unit. (gdb) l WinMain 6 7 extern int fun(void); 8 9 #ifdef __UNDER_CE__ 10 int APIENTRY WinMain(HINSTANCE inst, HINSTANCE pi, LPWSTR cmd, int show) 11 { 12 int x; 13 wchar_t s[32]; 14 15 localquery(); (gdb) break localquery Breakpoint 1 at 0x15810e0: file l.c, line 17. (gdb) c Continuing. Breakpoint 1, localquery () at l.c:17 17 wsprintf(s, L"localquery() -> %d", a[0]); (gdb) n 18 MessageBoxW(0, s, L"info", 0); (gdb) p a $1 = {3, 4, 5, 6, 0} (gdb) p &a $2 = (int (*)[5]) 0x1582000 (gdb) x/32xb 0x1582000 0x1582000 <a>: 0x03 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0x1582008 <a+8>: 0x05 0x00 0x00 0x00 0x06 0x00 0x00 0x00 0x1582010 <a+16>: 0x00 0x00 0x00 0x00 0x18 0x18 0x58 0x01 0x1582018 <first_atexit>: 0x60 0x00 0x12 0x00 0x64 0x00 0x12 0x00 (gdb) fin Run till exit from #0 localquery () at l.c:18 Error while mapping shared library sections: ole32.dll: No such file or directory. Error while mapping shared library sections: ossvcs.dll: No such file or directory. Error while mapping shared library sections: commctrl.dll: No such file or directory. Error while mapping shared library sections: aygshell.dll: No such file or directory. Error while mapping shared library sections: oleaut32.dll: No such file or directory. Error while mapping shared library sections: compime.dll: No such file or directory. Error while mapping shared library sections: shellres.dll: No such file or directory. WinMain (inst=0x254a42f6, pi=0x0, cmd=0x2211fed8, show=5) at main.c:16 16 x = fun(); (gdb) si 0x00011794 in fun () (gdb) display/x $pc 1: /x $pc = 0x11794 (gdb) si 0x00011798 in fun () 1: /x $pc = 0x11798 (gdb) display/i $pc 2: x/i $pc 0x11798 <fun+4>: ldr pc, [r12] (gdb) si fun () at t.c:6 6 { 2: x/i $pc 0x157108c <fun>: push {r11, lr} 1: /x $pc = 0x157108c (gdb) 0x01571090 6 { 2: x/i $pc 0x1571090 <fun+4>: add r11, sp, #4 ; 0x4 1: /x $pc = 0x1571090 (gdb) 0x01571094 6 { 2: x/i $pc 0x1571094 <fun+8>: sub sp, sp, #68 ; 0x44 1: /x $pc = 0x1571094 (gdb) 10 r = a[0]; 2: x/i $pc 0x1571098 <fun+12>: ldr r3, [pc, #64] ; 0x15710e0 <__fu0_a> 1: /x $pc = 0x1571098 (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x0 0 r4 0x254a42f6 625623798 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x2211fed8 571604696 r10 0x254a42f6 625623798 r11 0x2211fdd0 571604432 r12 0x131f0 78320 sp 0x2211fd88 0x2211fd88 lr 0x11078 69752 pc 0x1571098 0x1571098 <fun+12> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) x/32xb 0x15710e0 0x15710e0 <__fu0_a>: 0xb8 0x42 0x63 0x01 0x00 0x30 0x57 0x01 0x15710e8 <__fu0_a+8>: 0x28 0x30 0x57 0x01 0x04 0x30 0x9f 0xe5 0x15710f0 <__atexit_first+4>: 0x00 0x00 0x93 0xe5 0x0e 0xf0 0xa0 0xe1 0x15710f8 <__atexit_first+12>: 0x04 0x20 0x57 0x01 0x92 0x01 0x00 0xea (gdb) si 0x0157109c 10 r = a[0]; 2: x/i $pc 0x157109c <fun+16>: ldr r3, [r3] 1: /x $pc = 0x157109c (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x16342b8 23282360 r4 0x254a42f6 625623798 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x2211fed8 571604696 r10 0x254a42f6 625623798 r11 0x2211fdd0 571604432 r12 0x131f0 78320 sp 0x2211fd88 0x2211fd88 lr 0x11078 69752 pc 0x157109c 0x157109c <fun+16> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) x/32xb 0x16342b8 0x16342b8: Cannot access memory at address 0x16342b8 (gdb) si Data Abort: Thread=8556c640 Proc=8034e160 'main.exe' AKY=00010001 PC=0157109c(t.dll+0x0000109c) RA=00011078(main.exe +0x00001078) BVA=236342b8 FSR=00000007 Program received signal SIGSEGV, Segmentation fault. 0x0157109c in fun () at t.c:10 10 r = a[0]; 2: x/i $pc 0x157109c <fun+16>: ldr r3, [r3] 1: /x $pc = 0x157109c (gdb) pavilion: {405} arm-mingw32ce-gdb main.exe GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-mingw32ce"... (gdb) target remote ipaq:9999 Remote debugging using ipaq:9999 [New Thread -434447242] Error while mapping shared library sections: coredll.dll.0409.mui: No such file or directory. Error while mapping shared library sections: coredll.dll: No such file or directory. Reading symbols from /home/danny/simple/wince/array/t.dll...done. Loaded symbols for t.dll Reading symbols from /home/danny/simple/wince/array/l.dll...done. Loaded symbols for l.dll Symbol file not found for coredll.dll.0409.mui Symbol file not found for coredll.dll WinMainCRTStartup (hInst=0xe5d68efa, hPrevInst=0x0, lpCmdLine=0x1c11fed8, nCmdShow=5) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:35 35 { (gdb) l WinMain 6 7 extern int fun(void); 8 9 #ifdef __UNDER_CE__ 10 int APIENTRY WinMain(HINSTANCE inst, HINSTANCE pi, LPWSTR cmd, int show) 11 { 12 int x; 13 wchar_t s[32]; 14 15 localquery(); (gdb) break 16 Breakpoint 1 at 0x11074: file main.c, line 16. (gdb) c Continuing. Error while mapping shared library sections: ole32.dll: No such file or directory. Error while mapping shared library sections: ossvcs.dll: No such file or directory. Error while mapping shared library sections: commctrl.dll: No such file or directory. Error while mapping shared library sections: aygshell.dll: No such file or directory. Error while mapping shared library sections: oleaut32.dll: No such file or directory. Error while mapping shared library sections: compime.dll: No such file or directory. Error while mapping shared library sections: shellres.dll: No such file or directory. Breakpoint 1, WinMain (inst=0xe5d68efa, pi=0x0, cmd=0x1c11fed8, show=5) at main.c:16 16 x = fun(); (gdb) display/i $pc 1: x/i $pc 0x11074 <WinMain+32>: bl 0x11794 <fun> (gdb) si 0x00011794 in fun () 1: x/i $pc 0x11794 <fun>: ldr r12, [pc, #0] ; 0x1179c <fun+8> (gdb) 0x00011798 in fun () 1: x/i $pc 0x11798 <fun+4>: ldr pc, [r12] (gdb) fun () at t.c:6 6 { 1: x/i $pc 0x14e108c <fun>: push {r11, lr} (gdb) 0x014e1090 6 { 1: x/i $pc 0x14e1090 <fun+4>: add r11, sp, #4 ; 0x4 (gdb) 0x014e1094 6 { 1: x/i $pc 0x14e1094 <fun+8>: sub sp, sp, #68 ; 0x44 (gdb) 10 r = a[0]; 1: x/i $pc 0x14e1098 <fun+12>: ldr r3, [pc, #64] ; 0x14e10e0 <__fu0_a> (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x0 0 r4 0xe5d68efa 3856043770 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x1c11fed8 470941400 r10 0xe5d68efa 3856043770 r11 0x1c11fdd0 470941136 r12 0x131f0 78320 sp 0x1c11fd88 0x1c11fd88 lr 0x11078 69752 pc 0x14e1098 0x14e1098 <fun+12> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) x/32bx 0x14e10e0 0x14e10e0 <__fu0_a>: 0xf8 0x1f 0x4f 0x01 0x00 0x30 0x4e 0x01 0x14e10e8 <__fu0_a+8>: 0x28 0x30 0x4e 0x01 0x04 0x30 0x9f 0xe5 0x14e10f0 <__atexit_first+4>: 0x00 0x00 0x93 0xe5 0x0e 0xf0 0xa0 0xe1 0x14e10f8 <__atexit_first+12>: 0x04 0x20 0x4e 0x01 0x92 0x01 0x00 0xea (gdb) si 0x014e109c 10 r = a[0]; 1: x/i $pc 0x14e109c <fun+16>: ldr r3, [r3] (gdb) l fun 1 #include <windows.h> 2 3 extern int a[]; 4 5 int fun(void) 6 { 7 wchar_t s[32]; 8 int r; 9 10 r = a[0]; (gdb) p &fun $1 = (int (*)(void)) 0x14e108c <fun> (gdb) disas &fun Dump of assembler code for function fun: 0x014e108c <fun+0>: push {r11, lr} 0x014e1090 <fun+4>: add r11, sp, #4 ; 0x4 0x014e1094 <fun+8>: sub sp, sp, #68 ; 0x44 0x014e1098 <fun+12>: ldr r3, [pc, #64] ; 0x14e10e0 <__fu0_a> 0x014e109c <fun+16>: ldr r3, [r3] 0x014e10a0 <fun+20>: str r3, [r11, #-8] 0x014e10a4 <fun+24>: sub r3, r11, #72 ; 0x48 0x014e10a8 <fun+28>: mov r0, r3 0x014e10ac <fun+32>: ldr r1, [pc, #48] ; 0x14e10e4 <__fu0_a+4> 0x014e10b0 <fun+36>: ldr r2, [r11, #-8] 0x014e10b4 <fun+40>: bl 0x14e1710 <wsprintfW> 0x014e10b8 <fun+44>: sub r3, r11, #72 ; 0x48 0x014e10bc <fun+48>: mov r0, #0 ; 0x0 0x014e10c0 <fun+52>: mov r1, r3 0x014e10c4 <fun+56>: ldr r2, [pc, #28] ; 0x14e10e8 <__fu0_a+8> 0x014e10c8 <fun+60>: mov r3, #0 ; 0x0 0x014e10cc <fun+64>: bl 0x14e171c <MessageBoxW> 0x014e10d0 <fun+68>: ldr r3, [r11, #-8] 0x014e10d4 <fun+72>: mov r0, r3 0x014e10d8 <fun+76>: sub sp, r11, #4 ; 0x4 0x014e10dc <fun+80>: pop {r11, pc} 0x014e10e0 <__fu0_a+0>: strdeq r1, [pc, #-248] ; 0x14e0ff0 0x014e10e4 <__fu0_a+4>: cmpeq lr, r0 0x014e10e8 <__fu0_a+8>: cmpeq lr, r8, lsr #32 End of assembler dump. (gdb) bt #0 0x014e109c in fun () at t.c:10 #1 0x00011078 in WinMain (inst=0xe5d68efa, pi=0x0, cmd=0x1c11fed8, show=5) at main.c:16 #2 0x0001103c in WinMainCRTStartup (hInst=0xe5d68efa, hPrevInst=<value optimized out>, lpCmdLine=<value optimized out>, nCmdShow=<value optimized out>) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:62 (gdb) disass localquery Dump of assembler code for function localquery: 0x014f10d4 <localquery+0>: push {r11, lr} 0x014f10d8 <localquery+4>: add r11, sp, #4 ; 0x4 0x014f10dc <localquery+8>: sub sp, sp, #64 ; 0x40 0x014f10e0 <localquery+12>: ldr r3, [pc, #52] ; 0x14f111c <localquery+72> 0x014f10e4 <localquery+16>: ldr r3, [r3] 0x014f10e8 <localquery+20>: sub r2, r11, #68 ; 0x44 0x014f10ec <localquery+24>: mov r0, r2 0x014f10f0 <localquery+28>: ldr r1, [pc, #40] ; 0x14f1120 <localquery+76> 0x014f10f4 <localquery+32>: mov r2, r3 0x014f10f8 <localquery+36>: bl 0x14f174c <wsprintfW> 0x014f10fc <localquery+40>: sub r3, r11, #68 ; 0x44 0x014f1100 <localquery+44>: mov r0, #0 ; 0x0 0x014f1104 <localquery+48>: mov r1, r3 0x014f1108 <localquery+52>: ldr r2, [pc, #20] ; 0x14f1124 <localquery+80> 0x014f110c <localquery+56>: mov r3, #0 ; 0x0 0x014f1110 <localquery+60>: bl 0x14f1758 <MessageBoxW> 0x014f1114 <localquery+64>: sub sp, r11, #4 ; 0x4 0x014f1118 <localquery+68>: pop {r11, pc} 0x014f111c <localquery+72>: mrseq r2, SPSR 0x014f1120 <localquery+76>: mrseq r3, SPSR 0x014f1124 <localquery+80>: cmpeq pc, r8, lsr #32 End of assembler dump. (gdb) x/32xb 0x014f111c 0x14f111c <localquery+72>: 0x00 0x20 0x4f 0x01 0x00 0x30 0x4f 0x01 0x14f1124 <localquery+80>: 0x28 0x30 0x4f 0x01 0x04 0x30 0x9f 0xe5 0x14f112c <__atexit_first+4>: 0x00 0x00 0x93 0xe5 0x0e 0xf0 0xa0 0xe1 0x14f1134 <__atexit_first+12>: 0x18 0x20 0x4f 0x01 0x92 0x01 0x00 0xea (gdb) x/32xb 0x014f2000 0x14f2000 <a>: 0x03 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0x14f2008 <a+8>: 0x05 0x00 0x00 0x00 0x06 0x00 0x00 0x00 0x14f2010 <a+16>: 0x00 0x00 0x00 0x00 0x18 0x18 0x4f 0x01 0x14f2018 <first_atexit>: 0x60 0x00 0x12 0x00 0x64 0x00 0x12 0x00 (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x14f1ff8 21962744 r4 0xe5d68efa 3856043770 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x1c11fed8 470941400 r10 0xe5d68efa 3856043770 r11 0x1c11fdd0 470941136 r12 0x131f0 78320 sp 0x1c11fd88 0x1c11fd88 lr 0x11078 69752 pc 0x14e109c 0x14e109c <fun+16> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) set $r3 0x14f2000 A syntax error in expression, near `0x14f2000'. (gdb) set $r3 x14f2000 A syntax error in expression, near `x14f2000'. (gdb) set $r3 0 A syntax error in expression, near `0'. (gdb) set $r3=0 (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x0 0 r4 0xe5d68efa 3856043770 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x1c11fed8 470941400 r10 0xe5d68efa 3856043770 r11 0x1c11fdd0 470941136 r12 0x131f0 78320 sp 0x1c11fd88 0x1c11fd88 lr 0x11078 69752 pc 0x14e109c 0x14e109c <fun+16> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) set $r3=0x14f2000 (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x14f2000 21962752 r4 0xe5d68efa 3856043770 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x1c11fed8 470941400 r10 0xe5d68efa 3856043770 r11 0x1c11fdd0 470941136 r12 0x131f0 78320 sp 0x1c11fd88 0x1c11fd88 lr 0x11078 69752 pc 0x14e109c 0x14e109c <fun+16> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) si 0x014e10a0 10 r = a[0]; 1: x/i $pc 0x14e10a0 <fun+20>: str r3, [r11, #-8] (gdb) info reg r0 0x1 1 r1 0x2 2 r2 0x10 16 r3 0x3 3 r4 0xe5d68efa 3856043770 r5 0x2 2 r6 0x11000 69632 r7 0x1ffcc74 33541236 r8 0x1ffc9e0 33540576 r9 0x1c11fed8 470941400 r10 0xe5d68efa 3856043770 r11 0x1c11fdd0 470941136 r12 0x131f0 78320 sp 0x1c11fd88 0x1c11fd88 lr 0x11078 69752 pc 0x14e10a0 0x14e10a0 <fun+20> fps 0x0 0 cpsr 0x60000010 1610612752 (gdb) si 12 wsprintf(s, L"remote query -> %d", r); 1: x/i $pc 0x14e10a4 <fun+24>: sub r3, r11, #72 ; 0x48 (gdb) c Continuing. Program exited normally. (gdb) q -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-03-11 19:31:34
|
On Wed, 2010-03-10 at 22:05 +0100, Sébastien Lorquet wrote: > If that helps running programs on a pocket pc without going through > the cycle compile, copy to a windows pc (or a samba share), copy to > pocket pc through active sync drag drop, tap on the pocket pc to start > the program, etc then I'm interested :) I'm not a magician but it should make some things easier once file transfer works reliably, see below. > At least I can issue debug message to a remote syslog server via > active sync tcpip. Some of the things I don't like about gdbserver in its current state : - no proper way to start it either via rsh or via pocketconsole - it doesn't show in the CE process list The version I have now : - has a simple GUI with which you can specify which program to run, with which parameters (command line for the program to debug), and on which port gdbserver should talk - can start in --multi mode as well as single process mode - does show in the process list I don't seem to get file transfer (remote put/get) to work reliably. Has anyone played with that yet ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Sébastien L. <sq...@gm...> - 2010-03-10 21:06:11
|
Hi, If that helps running programs on a pocket pc without going through the cycle compile, copy to a windows pc (or a samba share), copy to pocket pc through active sync drag drop, tap on the pocket pc to start the program, etc then I'm interested :) At least I can issue debug message to a remote syslog server via active sync tcpip. Regards Sebastien On Wed, Mar 10, 2010 at 9:21 PM, Danny Backx <dan...@sc...> wrote: > I've not been terribly impressed with the rshd/gdbserver combination for > running debugging sessions. And you basically need a prompt to start > gdbserver. > > So I built a very basic version of a Windows program around gdbserver. > > I want to enhance it so it can be used with the gdbserver --multi option > as well. > > What should I do with this source ? Ultimately I might ask the gdb crowd > if they want it, but it's too early for that. > > Should I put this stuff in $CEGCC/tools for now, or is nobody > interested ? > > Danny > -- > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Cegcc-devel mailing list > Ceg...@li... > https://lists.sourceforge.net/lists/listinfo/cegcc-devel > |
From: Danny B. <dan...@sc...> - 2010-03-10 20:21:06
|
I've not been terribly impressed with the rshd/gdbserver combination for running debugging sessions. And you basically need a prompt to start gdbserver. So I built a very basic version of a Windows program around gdbserver. I want to enhance it so it can be used with the gdbserver --multi option as well. What should I do with this source ? Ultimately I might ask the gdb crowd if they want it, but it's too early for that. Should I put this stuff in $CEGCC/tools for now, or is nobody interested ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-03-10 20:14:47
|
On Tue, 2010-03-09 at 12:46 +0100, David Sveningsson wrote: > On 2010-03-08 22:29, Danny Backx wrote: > > On Mon, 2010-03-08 at 19:48 +0100, David Sveningsson wrote: > >> Danny Backx wrote: > >>> On Mon, 2010-03-08 at 17:29 +0100, David Sveningsson wrote: > >>>> On 2010-03-08 17:24, Danny Backx wrote: > >>>>>> Just to make sure the code is correct I compiled it with MSVC and indeed > >>>>>> 3 is reported three times. > >>>>> Can you send me the binaries for that ? > >>> > >>>> Recompiled, I just tried your binary and only localquery returns 3, > >>>> remotequery and fun returns garbage. > >>> > >>> So you recompiled with cegcc *and* with MSVC and got working EXEs > >>> twice ? > >> > >> Actually with mingw32ce, but yes. > > > > I'd like those EXE/DLLs too please. > > > > Danny > > > > > See http://dump.sidvind.com/wm61_declspec.tar.gz > > I just noticed something strange. > > The original source you provided does actually *not* work, both > remotequery and fun reports garbage. But with my declspec modifications > it works, when compiled both with mingw32ce and msvc. A diff is also > provided. > > Also, running your binaries directly (without recompiling) gives the > same result as the recompiled. > > The archive contains three sets of binaries: > > * Your original source, recompiled with mingw32ce (not working) [a] > * My modifications, compiled with mingw32ce (working) [b] > * Binaries produced by msvc (working) [msvc] Different here. Several differences, I'll focus on one : both the stuff in directory b and in directory msvc fail between the first and second dialog - meaning the second dialog never apppears. I've just done a debugging session with "b" : pavilion: {41} arm-mingw32ce-gdb main.exe GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-mingw32ce"... (gdb) target remote htc:9999 Remote debugging using htc:9999 [New Thread 1186696638] Error while mapping shared library sections: coredll.dll.0413.mui: No such file or directory. Error while mapping shared library sections: coredll.dll: No such file or directory. Reading symbols from /home/danny/david/wm61/b/t.dll...done. Loaded symbols for t.dll Reading symbols from /home/danny/david/wm61/b/l.dll...done. Loaded symbols for l.dll Symbol file not found for coredll.dll.0413.mui Symbol file not found for coredll.dll WinMainCRTStartup (hInst=0x45feeede, hPrevInst=0x0, lpCmdLine=0x31befed0, nCmdShow=5) at /temp/cegcc/trunk/cegcc/src/mingw/crt3.c:35 35 /temp/cegcc/trunk/cegcc/src/mingw/crt3.c: No such file or directory. in /temp/cegcc/trunk/cegcc/src/mingw/crt3.c (gdb) l WinMain 7 int __declspec(dllimport) fun(void); 8 void __declspec(dllimport) localquery(void); 9 10 #ifdef __UNDER_CE__ 11 int APIENTRY WinMain(HINSTANCE inst, HINSTANCE pi, LPWSTR cmd, int show) 12 { 13 int x; 14 wchar_t s[32]; 15 16 localquery(); (gdb) break 16 Breakpoint 1 at 0x11070: file main.c, line 16. (gdb) c Continuing. Breakpoint 1, WinMain (inst=0x45feeede, pi=0x0, cmd=0x31befed0, show=5) at main.c:16 16 localquery(); (gdb) s localquery () at l.c:17 17 wsprintf(s, L"localquery() -> %d", a[0]); (gdb) n 18 MessageBoxW(0, s, L"info", 0); (gdb) n Error while mapping shared library sections: commctrl.dll: No such file or directory. Error while mapping shared library sections: ole32.dll: No such file or directory. Error while mapping shared library sections: oleaut32.dll: No such file or directory. Error while mapping shared library sections: htmlview.dll: No such file or directory. Error while mapping shared library sections: ossvcs.dll: No such file or directory. Error while mapping shared library sections: aygshell.dll: No such file or directory. Error while mapping shared library sections: et9ime.dll: No such file or directory. ++ [ImeInquire] -- [ImeInquire] ++ [ImeSetActiveContext] ++ [ImeSetActiveContext] -- [ImeSetActiveContext] ++ [ImeSetActiveContext] Error while mapping shared library sections: et9disinput.dll: No such file or directory. Error while mapping shared library sections: et9dictionary.dll: No such file or directory. -- [ImeSetActiveContext] -- [ImeSetActiveContext] ++ [ImeSetActiveContext] -- [ImeSetActiveContext] ++ [ImeSetActiveContext] ++ [ImeSetActiveContext] -- [ImeSetActiveContext] ++ [ImeSetActiveContext] -- [ImeSetActiveContext] -- [ImeSetActiveContext] ++ [ImeSetActiveContext] -- [ImeSetActiveContext] 19 } (gdb) s WinMain (inst=0x45feeede, pi=0x0, cmd=0x31befed0, show=5) at main.c:17 17 x = fun(); (gdb) s fun () at t.c:10 10 r = a[0]; (gdb) p a $1 = 0x1062000 (gdb) p a[0] $2 = 3 (gdb) s Data Abort: Thread=84aaac64 Proc=80338930 'main.exe' AKY=00800001 PC=0105109c(t.dll+0x0000109c) RA=00011078(main.exe +0x00001078) BVA=310ac3c8 FSR=00000007 Program received signal SIGSEGV, Segmentation fault. 0x0105109c in fun () at t.c:10 10 r = a[0]; (gdb) and the b/t.dll.objdump file reads : 1000108c <fun>: 1000108c: e92d4800 push {fp, lr} 10001090: e28db004 add fp, sp, #4 10001094: e24dd044 sub sp, sp, #68 ; 0x44 10001098: e59f3044 ldr r3, [pc, #68] ; 100010e4 <fun +0x58> 1000109c: e5933000 ldr r3, [r3] 100010a0: e5933000 ldr r3, [r3] 100010a4: e50b3008 str r3, [fp, #-8] [...] 100010e4: 1000320c andne r3, r0, ip, lsl #4 100010e8: 10003000 andne r3, r0, r0 100010ec: 10003028 andne r3, r0, r8, lsr #32 Meaning, I think, that it does indeed crash in that statement. The double "ldr r3, [r3]" seems odd. Even more odd is that the code in a/t.dll.objdump is different : it looks exactly the same except only one of these "ldr r3, [r3]" instructions. Trying to figure out which one is correct, and how to debug at the assembler level :-( Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Pavel P. <pa...@su...> - 2010-03-09 07:02:36
|
For some reason in cegcc sdk some functions ifdefed this way: #if (_WIN32_WINNT >= 0x0501) void WSAAPI freeaddrinfo (struct addrinfo*); int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*, struct addrinfo**); int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD, char*,DWORD,int); ... Even though these are awailable as of Windows CE .NET 4.1 and later: http://msdn.microsoft.com/en-us/library/ms910263.aspx Mobile 6 sdk doesn't have any ifdef's around them also, so I think this header needs to be modified. |
From: David S. <ex...@si...> - 2010-03-08 16:28:39
|
On 2010-03-08 17:24, Danny Backx wrote: > On Mon, 2010-03-08 at 13:15 +0100, David Sveningsson wrote: >> On 2010-03-05 20:57, Danny Backx wrote: >>> David already helped me to find a really silly error in a previous >>> version. >>> >>> When I try the stuff in >>> http://danny.backx.info/download/cegcc/wm61.tar.gz I get different >>> results on different devices. >>> >>> I would expect the application to report the value 3 three times, but it >>> doesn't. This is with the code in SVN. >> >> On my device it actually does. >> >> I run it on an XPERIA X1 with CE-OS 5.2.19608 (Build 19608.1.2.60) > > Is that with the EXE and two DLLs that I provided, or recompiled > versions ? Recompiled, I just tried your binary and only localquery returns 3, remotequery and fun returns garbage. |
From: Danny B. <dan...@sc...> - 2010-03-08 16:23:40
|
On Mon, 2010-03-08 at 13:15 +0100, David Sveningsson wrote: > On 2010-03-05 20:57, Danny Backx wrote: > > David already helped me to find a really silly error in a previous > > version. > > > > When I try the stuff in > > http://danny.backx.info/download/cegcc/wm61.tar.gz I get different > > results on different devices. > > > > I would expect the application to report the value 3 three times, but it > > doesn't. This is with the code in SVN. > > On my device it actually does. > > I run it on an XPERIA X1 with CE-OS 5.2.19608 (Build 19608.1.2.60) Is that with the EXE and two DLLs that I provided, or recompiled versions ? > > Does anyone see what the problem is ? > > Just to make sure the code is correct I compiled it with MSVC and indeed > 3 is reported three times. Can you send me the binaries for that ? > The only changes made to the code is adding __declspec(dllexport) and > __declspec(dllimport) Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: David S. <ex...@si...> - 2010-03-08 13:18:35
|
On 2010-03-05 20:57, Danny Backx wrote: > David already helped me to find a really silly error in a previous > version. > > When I try the stuff in > http://danny.backx.info/download/cegcc/wm61.tar.gz I get different > results on different devices. > > I would expect the application to report the value 3 three times, but it > doesn't. This is with the code in SVN. On my device it actually does. I run it on an XPERIA X1 with CE-OS 5.2.19608 (Build 19608.1.2.60) > Does anyone see what the problem is ? Just to make sure the code is correct I compiled it with MSVC and indeed 3 is reported three times. The only changes made to the code is adding __declspec(dllexport) and __declspec(dllimport) |
From: Danny B. <dan...@sc...> - 2010-03-05 19:57:16
|
David already helped me to find a really silly error in a previous version. When I try the stuff in http://danny.backx.info/download/cegcc/wm61.tar.gz I get different results on different devices. I would expect the application to report the value 3 three times, but it doesn't. This is with the code in SVN. Does anyone see what the problem is ? Thanks, Danny pavilion: {248} tar tvfz /tmp/wm61.tar.gz drwxrwxr-x danny/danny 0 2010-03-05 20:53 ./ -rw-rw-r-- danny/danny 2278 2010-03-05 20:53 ./t.o -rw-rw-r-- danny/danny 177 2010-03-04 22:46 ./t.c -rwxrwxr-x danny/danny 31086 2010-03-05 20:53 ./l.dll -rw-rw-r-- danny/danny 121010 2010-03-05 20:53 ./l.dll.objdump -rw-rw-r-- danny/danny 442 2010-03-04 22:48 ./main.c -rw-rw-r-- danny/danny 2589 2010-03-05 20:53 ./l.o -rwxrwxr-x danny/danny 31022 2010-03-05 20:53 ./t.dll -rw-rw-r-- danny/danny 2621 2010-03-05 20:53 ./main.o -rw-rw-r-- danny/danny 242699 2010-03-05 20:53 ./t.dll.od -rw-rw-r-- danny/danny 1459 2010-03-05 20:07 ./Makefile -rwxrwxr-x danny/danny 29106 2010-03-05 20:53 ./main.exe -rw-rw-r-- danny/danny 121536 2010-03-05 20:53 ./t.dll.objdump -rw-rw-r-- danny/danny 239433 2010-03-05 20:53 ./l.dll.od -rw-rw-r-- danny/danny 235 2010-03-04 22:45 ./l.c pavilion: {249} ls -l /tmp/wm61.tar.gz -rw-rw-r-- 1 danny danny 174685 2010-03-05 20:54 /tmp/wm61.tar.gz pavilion: {250} more *.c :::::::::::::: l.c :::::::::::::: #include <windows.h> int a[5] = { 3, 4, 5, 6, 0 }; void foo(void) { a[0] = 1; a[1] = 2; a[2] = 3; a[3] = 0; } void localquery(void) { wchar_t s[32]; wsprintf(s, L"localquery() -> %d", a[0]); MessageBoxW(0, s, L"info", 0); } :::::::::::::: main.c :::::::::::::: #ifdef __UNDER_CE__ #include <windows.h> #endif #include <stdio.h> #include <stdlib.h> extern int fun(void); #ifdef __UNDER_CE__ int APIENTRY WinMain(HINSTANCE inst, HINSTANCE pi, LPWSTR cmd, int show) { int x; wchar_t s[32]; localquery(); x = fun(); wsprintf(s, L"fun() -> %d", x); MessageBox(0, s, L"info", 0); return 0; } #else int main(int argc, char *argv[]) { int x = fun(); printf("fun() -> %d\n", x); return 0; } #endif :::::::::::::: t.c :::::::::::::: #include <windows.h> extern int a[]; int fun(void) { wchar_t s[32]; int r; r = a[0]; wsprintf(s, L"remote query -> %d", r); MessageBoxW(0, s, L"info", 0); return r; } pavilion: {251} -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-03-03 14:56:39
|
On Tue, 2010-03-02 at 18:29 +0100, Danny Backx wrote: > On Sun, 2010-02-28 at 14:16 +0100, Danny Backx wrote: > > On Sun, 2010-02-28 at 08:33 +0100, Danny Backx wrote: > > > I'll try to get at this with a better test program :-) > > > > > > If anyone has any, please don't hesitate to send it. > > > > Simple test attached. > > I think I finally got this sorted out. It looks like ld/pe-dll.c > contains a function make_singleton_name_imp which is a bad copy of > make_singleton_name_thunk. Three simple fixes did the job. > > Please test. Warning - I appear to have screwed something up in my test environment. The DLL gets built but doesn't load. Continuing the search ... Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-03-02 17:46:39
|
On Sun, 2010-02-28 at 14:16 +0100, Danny Backx wrote: > On Sun, 2010-02-28 at 08:33 +0100, Danny Backx wrote: > > I'll try to get at this with a better test program :-) > > > > If anyone has any, please don't hesitate to send it. > > Simple test attached. I think I finally got this sorted out. It looks like ld/pe-dll.c contains a function make_singleton_name_imp which is a bad copy of make_singleton_name_thunk. Three simple fixes did the job. Please test. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-02-28 13:17:38
|
On Sun, 2010-02-28 at 08:33 +0100, Danny Backx wrote: > I'll try to get at this with a better test program :-) > > If anyone has any, please don't hesitate to send it. Simple test attached. Danny pavilion: {111} make arm-mingw32ce-gcc -c -o t.o t.c arm-mingw32ce-gcc -c -o l.o l.c arm-mingw32ce-gcc -shared -o l.dll l.o arm-mingw32ce-gcc -shared -Wl,--enable-auto-import -o t.dll t.o -L. -ll collect2: ld terminated with signal 11 [Segmentation fault], core dumped make: *** [t.dll] Error 1 pavilion: {112} gdb /opt/mingw32ce/arm-mingw32ce/bin/ld core.13287 GNU gdb 6.8-7mdv2010.0 (Mandriva Linux release 2010.0) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-mandriva-linux-gnu"... warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/libz.so.1...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib/i686/libc.so.6...done. Loaded symbols for /lib/i686/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Core was generated by `/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.4.0/../../../../arm-mingw32ce/bin/ld --s'. Program terminated with signal 11, Segmentation fault. [New process 13287] #0 0x0808b531 in coff_write_relocs (abfd=0x97ee558, first_undef=2) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/bfd/coffcode.h:2665 2665 if (q->sym_ptr_ptr[0]->the_bfd != abfd) Missing debug package(s), you should install: glibc-debug-2.10.1-6.2mnb2.i586 zlib-debug-1.2.3-13mdv2010.0.i586 (gdb) bt #0 0x0808b531 in coff_write_relocs (abfd=0x97ee558, first_undef=2) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/bfd/coffcode.h:2665 #1 0x0808c7c4 in coff_write_object_contents (abfd=0x97ee558) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/bfd/coffcode.h:4145 #2 0x080787c0 in bfd_make_readable (abfd=0x97ee558) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/bfd/opncls.c:865 #3 0x0806b330 in make_singleton_name_imp (import=0x96a5b44 "a", parent=0x9699a78) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/ld/pe-dll.c:2253 #4 0x0806c1cf in pe_create_import_fixup (rel=0x96a5d40, s=0x96a66b0, addend=0) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/ld/pe-dll.c:2570 #5 0x08064e5b in make_import_fixup (rel=0x96a5d40, s=0x96a66b0) at earm_wince_pe.c:964 #6 0x080689ee in pe_walk_relocs_of_symbol (info=0x80e95e0, name=0x969bebc "a", cb=0x8064dc0 <make_import_fixup>) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/ld/pe-dll.c:1262 #7 0x08064271 in pe_find_data_imports () at earm_wince_pe.c:1034 #8 0x08064441 in gld_arm_wince_pe_after_open () at earm_wince_pe.c:1131 #9 0x0805f7bb in ldemul_after_open () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/ld/ldemul.c:66 #10 0x08058916 in lang_process () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/ld/ldlang.c:6293 #11 0x0805c93e in main (argc=27, argv=0xbfe0f494) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/binutils/ld/ldmain.c:455 (gdb) -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: Danny B. <dan...@sc...> - 2010-02-28 07:33:33
|
On Mon, 2010-01-18 at 16:26 +0100, David Sveningsson wrote: > The callstack I get is similar but not quite the same: > > (gdb) bt > #0 0x00000000004442bb in coff_write_relocs (abfd=0x196ff20) at > /home/ext/temp/cegcc/src/binutils/bfd/coffcode.h:2651 > #1 coff_write_object_contents (abfd=0x196ff20) at > /home/ext/temp/cegcc/src/binutils/bfd/coffcode.h:4131 > #2 0x000000000042fb57 in bfd_make_readable (abfd=0x196ff20) at > /home/ext/temp/cegcc/src/binutils/bfd/opncls.c:865 > #3 0x0000000000424510 in make_singleton_name_imp (rel=0x1db62a0, > s=<value optimized out>, addend=0) > at /home/ext/temp/cegcc/src/binutils/ld/pe-dll.c:2253 > #4 pe_create_import_fixup (rel=0x1db62a0, s=<value optimized out>, > addend=0) at /home/ext/temp/cegcc/src/binutils/ld/pe-dll.c:2570 > #5 0x000000000041dda2 in make_import_fixup (rel=0x1db62a0, s=0x19810c0) > at earm_wince_pe.c:957 > #6 0x00000000004203e7 in pe_walk_relocs_of_symbol (info=<value > optimized out>, name=0x1981ea0 "av_pix_fmt_descriptors", > cb=0x41dd20 <make_import_fixup>) at > /home/ext/temp/cegcc/src/binutils/ld/pe-dll.c:1262 > #7 0x000000000041d1eb in pe_find_data_imports () at earm_wince_pe.c:1027 > #8 0x000000000041d3ba in gld_arm_wince_pe_after_open () at > earm_wince_pe.c:1124 > #9 0x0000000000410e48 in lang_process () at > /home/ext/temp/cegcc/src/binutils/ld/ldlang.c:6293 > #10 0x0000000000415907 in main (argc=83, argv=0x7fff39dc8b58) at > /home/ext/temp/cegcc/src/binutils/ld/ldmain.c:455 > > > (gdb) frame 0 > #0 0x00000000004442bb in coff_write_relocs (abfd=0x196ff20) at > /home/ext/temp/cegcc/src/binutils/bfd/coffcode.h:2651 > 2651 if (q->sym_ptr_ptr[0]->the_bfd != abfd) > > > > (gdb) p q->sym_ptr_ptr[0] > $5 = (struct bfd_symbol *) 0x0 FYI I've had little time lately but I'm continuing to pursue this issue. I've created a small test program that got ld to crash in a different way, and solved that yesterday. Unfortunately, that fix (it's in SVN) didn't solve the original program. I'll try to get at this with a better test program :-) If anyone has any, please don't hesitate to send it. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |
From: SourceForge.net <no...@so...> - 2010-02-26 20:58:01
|
Bugs item #2958451, was opened at 2010-02-25 02:19 Message generated for change (Comment added) made by dannybackx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=865514&aid=2958451&group_id=173455 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: CeGCC (arm-wince-cegcc) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: I tried compile sed, wget , gawk Initial Comment: I use Ubuntu 9.04 and cegcc-0.59.1.tar.bz2 . I tried compile sed-4.2.1.tar.bz2 but error. ----------------------------------------------------- -Wall -mms-bitfields -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c utils.c: In function 'follow_symlink': utils.c:363: error: 'S_IFLNK' undeclared (first use in this function) utils.c:363: error: (Each undeclared identifier is reported only once utils.c:363: error: for each function it appears in.) utils.c:371: warning: implicit declaration of function 'readlink' ----------------------------------------------------------- opt/cegcc/arm-cegcc/include/sys/stat.h ------------------------------------------------------------- #ifdef __CYGWIN__ #include <cygwin/stat.h> #ifdef _COMPILING_NEWLIB #define stat64 __stat64 #endif #else struct stat { dev_t st_dev; ino_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; dev_t st_rdev; off_t st_size; /* SysV/sco doesn't have the rest... But Solaris, eabi does. */ #if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__) time_t st_atime; time_t st_mtime; time_t st_ctime; #else time_t st_atime; long st_spare1; time_t st_mtime; long st_spare2; time_t st_ctime; long st_spare3; long st_blksize; long st_blocks; long st_spare4[2]; #endif }; #endif #define _IFMT 0170000 /* type of file */ #define _IFDIR 0040000 /* directory */ #define _IFCHR 0020000 /* character special */ #define _IFBLK 0060000 /* block special */ #define _IFREG 0100000 /* regular */ #define _IFLNK 0120000 /* symbolic link */ #define _IFSOCK 0140000 /* socket */ #define _IFIFO 0010000 /* fifo */ #define S_BLKSIZE 1024 /* size of a block */ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #ifndef _POSIX_SOURCE #define S_ISVTX 0001000 /* save swapped text even after use */ #define S_IREAD 0000400 /* read permission, owner */ #define S_IWRITE 0000200 /* write permission, owner */ #define S_IEXEC 0000100 /* execute/search permission, owner */ #define S_ENFMT 0002000 /* enforcement-mode locking */ #define S_IFMT _IFMT #define S_IFDIR _IFDIR #define S_IFCHR _IFCHR #define S_IFBLK _IFBLK #define S_IFREG _IFREG #define S_IFLNK _IFLNK #define S_IFSOCK _IFSOCK #define S_IFIFO _IFIFO #endif /* !_POSIX_SOURCE */ #ifdef _WIN32 /* The Windows header files define _S_ forms of these, so we do too for easier portability. */ #define _S_IFMT _IFMT #define _S_IFDIR _IFDIR #define _S_IFCHR _IFCHR #define _S_IFIFO _IFIFO #define _S_IFREG _IFREG #define _S_IREAD 0000400 #define _S_IWRITE 0000200 #define _S_IEXEC 0000100 #endif #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #define S_IRUSR 0000400 /* read permission, owner */ #define S_IWUSR 0000200 /* write permission, owner */ #define S_IXUSR 0000100/* execute/search permission, owner */ #define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #define S_IRGRP 0000040 /* read permission, group */ #define S_IWGRP 0000020 /* write permission, grougroup */ #define S_IXGRP 0000010/* execute/search permission, group */ #define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #define S_IROTH 0000004 /* read permission, other */ #define S_IWOTH 0000002 /* write permission, other */ #define S_IXOTH 0000001/* execute/search permission, other */ #define S_ISBLK(m) (((m)&_IFMT) == _IFBLK) #define S_ISCHR(m) (((m)&_IFMT) == _IFCHR) #define S_ISDIR(m) (((m)&_IFMT) == _IFDIR) #define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO) #define S_ISREG(m) (((m)&_IFMT) == _IFREG) #define S_ISLNK(m) (((m)&_IFMT) == _IFLNK) #define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK) int _EXFUN(chmod,( const char *__path, mode_t __mode )); int _EXFUN(fchmod,(int __fd, mode_t __mode)); int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); int _EXFUN(mkdir,( const char *_path, mode_t __mode )); int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); int _EXFUN(stat,( const char *__path, struct stat *__sbuf )); mode_t _EXFUN(umask,( mode_t __mask )); #if defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__) int _EXFUN(lstat,( const char *__path, struct stat *__buf )); int _EXFUN(mknod,( const char *__path, mode_t __mode, dev_t __dev )); #endif -------------------------------------------------------------- I'm not use Cygwin. I tried compile wget-1.12 , but error ------------------------------------------------------------ arm-cegcc-gcc -DHAVE_CONFIG_H -I. -I../src -D_WIN32_WCE=0x0400 -O3 -Wall -mms-bitfields -MT strcasestr.o -MD -MP -MF .deps/strcasestr.Tpo -c -o strcasestr.o strcasestr.c In file included from strcasestr.c:27: ./strings.h:27:26: error: strings.h: No such file or directory make[3]: *** [strcasestr.o] Error 1 ---------------------------------------------------------------- I tried compile gawk-3.1.7 , but error. ---------------------------------------------------------------- arm-cegcc-gcc -DDEFPATH="\".:/usr/local/wince/share/awk\"" -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"/usr/local/wince/share/locale\"" -I. -I./libsigsegv/src -D_WIN32_WCE=0x0400 -D_WIN32_IE=0x0400 -DNO_ERRNO_H -O3 -Wall -mms-bitfields -MT replace.o -MD -MP -MF .deps/replace.Tpo -c -o replace.o replace.c In file included from replace.c:47: missing_d/system.c:19: error: expected declaration specifiers or '...' before string constant missing_d/system.c:19: error: expected declaration specifiers or '...' before numeric constant missing_d/system.c:19: error: conflicting types for 'r_fatal' missing_d/system.c:19: note: a parameter list with an ellipsis can't match an empty parameter name list declaration awk.h:1162: note: previous declaration of 'r_fatal' was here missing_d/system.c: In function 'system': missing_d/system.c:24: error: argument 's' doesn't match prototype /opt/cegcc/lib/gcc/arm-cegcc/4.4.0/../../../../arm-cegcc/include/stdlib.h:122: error: prototype declaration make[2]: *** [replace.o] -------------------------------------------------------------------- Thanks, ---------------------------------------------------------------------- >Comment By: Danny Backx (dannybackx) Date: 2010-02-26 21:58 Message: Please provide accurate information about what you're doing and what exactly makes you suspect a problem in cegcc. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2010-02-26 10:11 Message: config.sub change because use "--host=arm-cegcc" ------------------------------------------------------- c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; ---------------------------------------------------------- | -chorusos* | -chorusrdb* | -cegcc* \ ------------------------------------------------------------ PATH=/opt/cegcc/bin:$PATH wget12 ./configure CC=arm-cegcc-gcc --prefix=/usr/local/wince --host=arm-cegcc LDFLAGS="-s" CPPFLAGS="-D_WIN32_WCE=0x0400 -DNO_ERRNO_H" CFLAGS="-O3 -Wall -mms-bitfields" --disable-opie --disable-digest --disable-ntlm --disable-debug --disable-largefile --disable-rpath --disable-ipv6 --disable-nls --disable-iri gawk and sed ./configure CC=arm-cegcc-gcc --prefix=/usr/local/wince --host=arm-cegcc LDFLAGS="-s" CPPFLAGS="-D_WIN32_WCE=0x0400" CFLAGS="-O3 -Wall -mms-bitfields" "LDFLAGS: --enable-auto-import" is configure error, so I'm not use. --------------------------------------------------------- I hope use wget and emacs. automake autoconf bison install ok. But texinfo gettext ncurses pdcurses ... are error. Configure check and make error says glibc headerfile not found. I can't compile wget and emacs. ---------------------------------------------------------------------- Comment By: Danny Backx (dannybackx) Date: 2010-02-25 17:35 Message: What is your point ? I created a small test : #include <sys/stat.h> int x() { return S_IFLNK; } arm-cegcc-gcc -c test.c compiles this without problem. So I guess you may be using something different ? Also, I am not sure why you expect a source not written for CE to compile with cegcc without a problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=865514&aid=2958451&group_id=173455 |