Re: [Cegcc-devel] size od CeGCC generated code

2007-12-03 Thread Kevin O'Connor
Hi Jacek, On Mon, Dec 03, 2007 at 06:57:35PM +0100, Jacek M. Holeczek wrote: > > Jacek, I think it would be better to reword your FAQ so that it states > > using -fno-exceptions, -fno-rtti, and using gcc instead of g++. > > Anything less and even simple c++ programs are going to end up pulling > >

Re: [Cegcc-devel] size od CeGCC generated code

2007-12-02 Thread Kevin O'Connor
On Sun, Dec 02, 2007 at 11:51:18AM -0500, Kevin O'Connor wrote: > When I went through this exercise, I just started commenting out stuff > to see what was forcing the exceptions into the exe. I got down to > the following stuff still needed from libsupc++.a: > > undefined

Re: [Cegcc-devel] size od CeGCC generated code

2007-12-02 Thread Kevin O'Connor
On Sun, Dec 02, 2007 at 02:41:17AM +, Pedro Alves wrote: > Kevin O'Connor wrote: > > Unfortunately, try as I might, I could not get haret (see > > http://www.handhelds.org/moin/moin.cgi/HaRET) to shrink with > > -fno-exceptions. As a guess, it looks like anything tha

Re: [Cegcc-devel] size od CeGCC generated code

2007-12-01 Thread Kevin O'Connor
Hi Jacek, Thanks for providing the FAQ. I found answer 10 to be very informative. I too had noticed the 40K of baggage that the c++ compiler appends to programs. However, I didn't know that the -fno-exceptions flag could reduce this. Unfortunately, try as I might, I could not get haret (see ht

Re: [Cegcc-devel] Automatic dummy WinMain

2007-09-10 Thread Kevin O'Connor
On Mon, Sep 10, 2007 at 11:09:21PM +0100, Matthew Kille wrote: > Hi All, > > (Using mingw32ce toolchain, revision 1049 I believe.) > > Can someone help explain to me the mechanisms behind how the 'dummy > WinMain' function (in winmain_ce.c) is conditionally linked into the > output binary if th

Re: [Cegcc-devel] API missing (HeapCompact, CreateToolhelp32Snapshot)

2007-09-04 Thread Kevin O'Connor
Hi Pascal, On Mon, Sep 03, 2007 at 09:14:35AM +0200, [EMAIL PROTECTED] wrote: > Hi, > > I am developping a chess database application for Pocket PC > (http://prolinux.free.fr/scid/PPC.html), and I appreciate a lot to be able to > do > it under Linux and that cegcc provides an Unix layer. > > I

Re: [Cegcc-devel] C++ exceptions

2007-07-10 Thread Kevin O'Connor
Hi! On Sun, Jul 08, 2007 at 08:20:49PM +0100, Pedro Alves wrote: > Hi all, > > Here goes the v2 of the seh giga macros. Wear sunglasses. > > * __finally blocks don't eat the exception anymore. > > * The filter in __except (filter), is now really an > expression, thanks to gcc's preprocessor

Re: [Cegcc-devel] C++ exceptions

2007-07-05 Thread Kevin O'Connor
On Fri, Jul 06, 2007 at 03:03:41AM +0100, Pedro Alves wrote: > Kevin O'Connor wrote: > >Earlier on, I tried to use the same __try/__except syntax that msdn > >documents. However, I gave up on it - it was too complicated and not > >useful for me. In particular, imple

Re: [Cegcc-devel] C++ exceptions

2007-07-04 Thread Kevin O'Connor
On Thu, Jul 05, 2007 at 02:54:33AM +0100, Pedro Alves wrote: > #define TRY_EXCEPTION_HANDLER \ > struct eh_data __ehd; \ > int __ret = setjmp(__ehd.env); \ > if (!__ret) { \ > start_ehandling(&__e

Re: [Cegcc-devel] C++ exceptions

2007-07-04 Thread Kevin O'Connor
On Thu, Jul 05, 2007 at 01:46:30AM +0100, Pedro Alves wrote: > This is the part I was trying to get right with the macros: > > > __asm__( > > // Data to be placed at start of .text section > > "\t.section .init\n" > > "\t.word eh_handler\n" > > "\t.word 0\n" > > "start_eh_text:

Re: [Cegcc-devel] C++ exceptions

2007-07-04 Thread Kevin O'Connor
On Wed, Jul 04, 2007 at 11:31:30PM +0100, Pedro Alves wrote: > Kevin O'Connor wrote: > > I think future versions of gcc wont guarantee function placement > > relative to top-level asm statements. > > > > Ah, you're paying attention. :) It will certai

Re: [Cegcc-devel] C++ exceptions

2007-07-04 Thread Kevin O'Connor
On Tue, Jul 03, 2007 at 09:55:15PM +0100, Pedro Alves wrote: > Perhaps. Did you look closely? I've registered the .pdata stuff and > the data just before the function directly in the source file that > uses it. That means we can probably hide it in > more-or-less-easy-to-use macros in any functi

Re: [Cegcc-devel] C++ exceptions

2007-07-04 Thread Kevin O'Connor
On Mon, Jul 02, 2007 at 12:38:48AM +0100, Pedro Alves wrote: > Kevin O'Connor escreveu: > > Is it safe to enter an exception handler using the calling program's > > stack? That is, if you set the pc to a handler and call > > EXCEPTION_CONTINUE_EXECUTION that h

Re: [Cegcc-devel] C++ exceptions

2007-07-01 Thread Kevin O'Connor
On Sun, Jul 01, 2007 at 08:12:33PM +0100, Pedro Alves wrote: > Danny Backx wrote: > > void Handle(struct _EXCEPTION_RECORD *ExceptionRecord, > > void *EstablisherFrame, > > struct _CONTEXT *ContextRecord, > > struct _DISPATCHER_CONTEXT *DispatcherContext) > > { >

Re: [Cegcc-devel] C++ exceptions

2007-07-01 Thread Kevin O'Connor
On Fri, Jun 22, 2007 at 09:37:21PM +0200, Danny Backx wrote: > The null.C example however - when used with my exception handling code - > shows a dialog from my new exception handler, but never makes its way to > the C++ exception handler. Have you figured out a way to raise a c++ exception from t

Re: [Cegcc-devel] Minimalistic mingw32ce exception handler works

2007-06-06 Thread Kevin O'Connor
Hi Danny, On Wed, Jun 06, 2007 at 10:15:57PM +0200, Danny Backx wrote: > I've just hacked up an experiment that does work, I don't recall what > was wrong with my previous attempt of a couple of weeks ago. [...] > I assume that the best way forward is > (1) to make these better than this proof of

Re: [Cegcc-devel] Catching exceptions with mingw32ce

2007-06-04 Thread Kevin O'Connor
On Sun, Jun 03, 2007 at 11:09:34PM +0100, Pedro Alves wrote: > Kevin O'Connor wrote: > > So, is it possible to have mingw32ce install a global SEH handler that > > just translates the exception into an sjlj one? That is, can we > > modify the standard crt0.S fi

Re: [Cegcc-devel] Catching exceptions with mingw32ce

2007-06-03 Thread Kevin O'Connor
Hi Pedro, I'm going to reply to both your emails here. On Sat, Jun 02, 2007 at 08:20:12PM +0100, Pedro Alves wrote: > Hi Kevin, > > glad to see you're still around :) Heh, my silence was just because everything has been working really well. :-) On Sun, Jun 03, 2007 at 07:01:35PM +0100, Pedro

Re: [Cegcc-devel] UserKInfo?

2007-06-03 Thread Kevin O'Connor
On Sat, Jun 02, 2007 at 08:56:29PM +0100, Pedro Alves wrote: > Kevin O'Connor wrote: > > In the wince docs a couple of pages refer to a UserKInfo array. For > > example, see the docs for UserKInfo[KINX_PFN_SHIFT] in the remarks > > section of the following p

[Cegcc-devel] Catching exceptions with mingw32ce

2007-06-02 Thread Kevin O'Connor
Hi, I recently ported the haret application (http://www.handhelds.org/moin/moin.cgi/HaRET) to mingwce32. In the process, I used the c++ compiler, mainly because there were a few places in the existing msvc code that would catch bad pointer accesses and handle them gracefully. In the old code you

[Cegcc-devel] UserKInfo?

2007-06-02 Thread Kevin O'Connor
In the wince docs a couple of pages refer to a UserKInfo array. For example, see the docs for UserKInfo[KINX_PFN_SHIFT] in the remarks section of the following page: http://msdn2.microsoft.com/en-us/library/bb202781.aspx Any idea how this works and if it can be implemented in cegcc? -Kevin ---

Re: [Cegcc-devel] Defs for GetSystemPowerStatusEx2

2006-12-02 Thread Kevin O'Connor
/wceshellui5/html/wce50lrfsystempowerstatusex.asp -Kevin 2006-12-02 Kevin O'Connor <[EMAIL PROTECTED]> * include/winbase.h: Add SYSTEM_POWER_STATUS_EX structure. Add GetSystemPowerStatusEx function definition. Index: src/w32api/includ

[Cegcc-devel] Defs for GetSystemPowerStatusEx2

2006-11-26 Thread Kevin O'Connor
/html/wce50lrfGetSystemPowerStatusEx2.asp 2006-11-26 Kevin O'Connor <[EMAIL PROTECTED]> * include/winbase.h: Add SYSTEM_POWER_STATUS_EX2 structure. Add GetSystemPowerStatusEx2 function definition. Index: src/w32api/includ

[Cegcc-devel] Another tlhelp32.h patch

2006-11-26 Thread Kevin O'Connor
/html/wce50lrfCreateToolhelp32Snapshot.asp?frame=true The value comes from a google code search (newlib has the value). 2006-11-26 Kevin O'Connor <[EMAIL PROTECTED]> * include/tlhelp32.h (MODULEENTRY32): szModule is of MAX_PATH size on CE. * include/tlhelp32.h: define TH32CS_GETALLMO

Re: [Cegcc-devel] Pkfuncs.h?

2006-11-25 Thread Kevin O'Connor
On Tue, Nov 14, 2006 at 10:57:25AM +, Pedro Alves wrote: > Kevin O'Connor wrote: > >All of these can be found on MSDN at: > > > >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemain4/html/cmconKernelFunctions.asp > > > >According to

Re: [Cegcc-devel] Support for wince 2.1?

2006-11-25 Thread Kevin O'Connor
mand-line argument stuff. As discussed, I've moved the command-line parsing code from init.c to winmain_ce.c. I've also removed the call to GetCommandLineW and replaced it with the passed in command-line parameter. 2006-11-25 Kevin O'Connor <[EMAIL PROTECTED]>

Re: [Cegcc-devel] Support for wince 2.1?

2006-11-24 Thread Kevin O'Connor
On Thu, Nov 23, 2006 at 04:10:44AM +, Pedro Alves wrote: > Kevin O'Connor escreveu: > > As to a fix - I'm a bit confused by the current mingw crt1.c code. > > Why do we have WinMainCRTStartup call main() which then calls WinMain. > > Wouldn't it be simple

Re: [Cegcc-devel] Support for wince 2.1?

2006-11-22 Thread Kevin O'Connor
On Mon, Nov 20, 2006 at 02:27:59PM +, Pedro Alves wrote: > Pedro Alves escreveu: > > Kevin O'Connor escreveu: > > > >> On Mon, Nov 20, 2006 at 01:18:21AM +, Pedro Alves wrote: > >> > >> > >>> I have never seen a WinCE &l

[Cegcc-devel] Support for wince 2.1?

2006-11-19 Thread Kevin O'Connor
Hi, I've received a report that haret does not run on wince 2.1 machines. I've confirmed that this isn't a linker issue. The application seems to crash before calling into WinMain. Has anyone tested mingw32ce c++ on ce 2.1? To debug this, I changed my linker line to use "-e WinMain". The appli

Re: [Cegcc-devel] Breakage with libsupc++ & write()

2006-11-18 Thread Kevin O'Connor
On Thu, Nov 16, 2006 at 02:17:53PM +, Pedro Alves wrote: > Pedro Alves wrote: > >Paul Sokolovsky wrote: > > > >> But still, liboldname-ce would rather not export non-existent > >>functions. > >> > >> > >Oh, you are right, that was indeed a big thinko on my part. > >There is indeed a thin wri

[Cegcc-devel] tlhelp32.h patch

2006-11-18 Thread Kevin O'Connor
fields are not present, the api calls fail, because wince can't populate the full amount of data. All of the info from the patch comes at the pages linked from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcekernl/html/ceconToolHelpStructures.asp 2006-11-18 Kevin O&#

[Cegcc-devel] Pkfuncs.h?

2006-11-13 Thread Kevin O'Connor
Hi, I noticed that HaRET has a whole bunch of functions defined locally that are in the MSDN docs. For example, the functions: ForcePageout AllocPhysMem FreePhysMem SetKMode VirtualCopy SetProcPermissions etc. All of these can be found on MSDN at: http://msdn.microsoft.com/library/default.asp?

Re: [Cegcc-devel] w32api changes for CE

2006-11-11 Thread Kevin O'Connor
One more addition. I need two additional SPI_xxx defines. The names are from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefSystemParametersInfo.asp The values come from the haret code. -Kevin --- src/w32api/include/winuser.h(revision 784) +++ src

[Cegcc-devel] w32api changes for CE

2006-11-11 Thread Kevin O'Connor
Hi, This is a resend of a patch I sent last week. I'm including additional information on each of the changes. Changelog: * include/tlhelp32.h: Define CloseToolhelp32Snapshot. CE doesn't have unicode variants of toolhelp (there is a Process32Next, but no Process32NextW.)

Re: [Cegcc-devel] More header changes for CE

2006-11-05 Thread Kevin O'Connor
On Sun, Nov 05, 2006 at 11:49:57AM -0500, Kevin O'Connor wrote: > I have found additional definitions that should go into the headers. > (Most of these aren't in the videolan headers either, which is why I > didn't find them sooner.) I missed the necessary conversion of c

[Cegcc-devel] More header changes for CE

2006-11-05 Thread Kevin O'Connor
ERAPI HICON WINAPI CreateIconFromResourceEx(PBYTE,DWORD,BOOL,DWORD,int,int,UINT); Index: src/w32api/ChangeLog.ce === --- src/w32api/ChangeLog.ce (revision 777) +++ src/w32api/ChangeLog.ce (working copy) @@ -1,3 +1,15 @@ +2006-11-

Re: [Cegcc-devel] Build of cegcc fails

2006-11-02 Thread Kevin O'Connor
As a follow up to my earlier email - I've confirmed that the build now completes if I comment out the gdb stuff. -Kevin On Wed, Nov 01, 2006 at 07:34:28AM -0500, Kevin O'Connor wrote: > On Mon, Oct 30, 2006 at 05:35:33PM +0100, Danny Backx wrote: > > If you're using the s

Re: [Cegcc-devel] Build of cegcc fails

2006-11-01 Thread Kevin O'Connor
On Mon, Oct 30, 2006 at 05:35:33PM +0100, Danny Backx wrote: > If you're using the scripts/linux build, then yesterday's commits should > fix the build. If they don't, please tell me about it. Hi Danny, The compile gets much further now. However, it still fails in building gdb when doing the ceg

Re: [Cegcc-devel] About gdb breakage.

2006-10-31 Thread Kevin O'Connor
On Tue, Oct 31, 2006 at 07:03:45PM +, Pedro Alves wrote: > I'm puzzled. > I just built cegcc and mingw32ce to test for the recent patches, > and both versions of gdb built perfectly. > I used the scripts under src/ It still fails for me. It looks like the gdb compile is trying to mix the wind

Re: [Cegcc-devel] Build of cegcc fails

2006-10-28 Thread Kevin O'Connor
On Sat, Oct 28, 2006 at 09:35:23PM +0100, Pedro Alves wrote: > Is this kevin2? :) Yes. We've talked briefly on IRC before. > You can also try building using the alternative scripts under src/ > cd into src/ and just type ./build-mingw32ce.sh > > It should build also the c++ compiler. Okay. Th

Re: [Cegcc-devel] Build of cegcc fails

2006-10-28 Thread Kevin O'Connor
at 04:38:28PM -0400, Kevin O'Connor wrote: > Hi, > > I'd like to build the mingw compiler for wince. The program I'm > trying to compile is HaRET - a tool for investigating pocket pc > hardware and booting linux from WinCE. In the past, we've used the > videolan

[Cegcc-devel] Build of cegcc fails

2006-10-28 Thread Kevin O'Connor
Hi, I'd like to build the mingw compiler for wince. The program I'm trying to compile is HaRET - a tool for investigating pocket pc hardware and booting linux from WinCE. In the past, we've used the videolan toolset. I'm most interested in building the minimal compiler. Unfortunately, when I t