gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Re: Register as developer please.


From: Camm Maguire
Subject: Re: [Gcl-devel] Re: Register as developer please.
Date: 21 Mar 2002 13:48:23 -0500

Greetings!  OK in the interest of speed...

"Mike Thomas" <address@hidden> writes:

> This is a multi-part message in MIME format.
> 
> ------=_NextPart_000_0257_01C1D14D.04B8EE40
> Content-Type: text/plain;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> 
> Hi Camm.
> 
> > all I
> > need is for you to register as a user at savannah.gnu.org, and then
> > email me you user id.
> 
> mjthomas
> 

Done!

> (Registered yesterday Australian time.)
> 
> >  As with
> > the other developers with similar access, I only ask that we discuss
> > your first few commits to ensure that we are not
> > duplicating/interfering with each others work, and to work out a sane
> > policy on who is working on which files, etc.  If you could post a
> > 'cvs diff -u' before committing in this instance, for example, that
> > would be most helpful and appreciated.
> 
> No worries to all of this.  Attached is a diff I made yesterday which covers
> the important changes.  It also includes some debugging junk which I intend
> to remove before checking in.  My plan is to do a clean checkout, build
> under MSYS with Mingw32 and put back in just the minimum changes needed.
> 

OK

> > Of course, you can also submit patches if you'd prefer,
> 
> I prefer to work with CVS rather than passing patches on to someone else all
> the time - there is less room for version mix-ups.  Let's face it, that's
> what CVS is for.
> 

Agreed!

A few comments:

Index: cmpnew/cmpmain.lsp
===================================================================
RCS file: /cvsroot/gcl/gcl/cmpnew/cmpmain.lsp,v
retrieving revision 1.5
diff -r1.5 cmpmain.lsp
596c596,598
< 
---
>     #+winnt
>     (dotimes (i 12)
>       (write-char #\^@ o-file))

OK, I haven't yet read your other mail, but this looks a bit strange.
Go ahead and put it in, as long as its escaped with the #winnt if you
really need it, but "isn't there a better way?"  What are we trying to
achieve here?


Index: h/mingw.h
===================================================================

Whatever you'd like to do with this file is OK by me :-)!

RCS file: /cvsroot/gcl/gcl/h/mingw.h,v
retrieving revision 1.3
diff -r1.3 mingw.h
42c42,44
< #define DBEGIN 0x10000000
---
> #define DBEGIN _dbegin
> extern unsigned int _stacktop, _stackbottom, _dbegin;
> /*#define DBEGIN 0x10000000*/
119c121,124
< #define NULL_OR_ON_C_STACK(y) (((void *)(y)) < ((void *)0x400000))
---
> /*#define NULL_OR_ON_C_STACK(y) (((void *)(y)) < ((void *)0x400000))*/
> #define NULL_OR_ON_C_STACK(y) \
>     (((unsigned int)(y)) == 0 || \
>      (((unsigned int)(y)) > _stacktop && ((unsigned int)(y)) < _stackbottom))

OK, this bit looks like Dan Stanger's idea of making DBEGIN a dynamic
runtime variable.  If it works, great!  I'm very surprised, though, as
my (weak) understanding is that DBEGIN needs to be the same in the
raw_gcl run as in the saved_gcl final, as it is used to index the
types for the pages in memory.  If it moves, the whole GC should be
compromised.  Of course I could be wrong.

Again, go ahead and use it if you need it as long as its win only for
the time being.

133a139,140
> #define W32_MAX_RESERVED_HEAP_SIZE 0x00A00000; /* 10 MB */
> 
209c216
<                    ADD_FEATURE("I386"); ADD_FEATURE("WINNT")
---
>          ADD_FEATURE("I386"); ADD_FEATURE("WINNT"); 
> ADD_FEATURE("BROKEN_O4_OPT");

This is fine.  I looked into these a bit a while ago.  do they do
anything? 

Index: o/main.c
===================================================================
RCS file: /cvsroot/gcl/gcl/o/main.c,v
retrieving revision 1.9
diff -r1.9 main.c
58a59,61
> #ifdef WIN32
> #include <fcntl.h>
> #endif
85a89,92
> #ifdef _WIN32
> unsigned int _dbegin = 0x10100000;
> unsigned int _stacktop, _stackbottom;
> #endif
104a112
>         int dummy;
123a132,143
> #ifdef WIN32
>         _stackbottom = (unsigned int ) &dummy;
>         _stacktop    = _stackbottom - 0x10000; // ???
> #if 0            
>         fprintf ( stderr,
>                   "main: At initialisation _dbegin =%x, _stacktop = %x, 
> _stackbottom = %x\n",
>                   _dbegin,
>                   _stacktop,
>                   _stackbottom );
> #endif        
> #endif
> 

OK, see above.  Eventually it would be nice to have a generic way of
dealing with DBEGIN, but with the ifdef you have, use it if it works!

126a147,149
> #ifdef WIN32
>       _fmode = _O_BINARY;
> #endif

OK

343,345c366,368
<         if (catch_fatal>0 && interrupt_enable )
<         {catch_fatal = -1;
<          if (sgc_enabled)
---
>     if (catch_fatal>0 && interrupt_enable )
>         {catch_fatal = -1;
>          if (sgc_enabled)
347c370
<          if (sgc_enabled==0)
---
>          if (sgc_enabled==0)
349,351c372,375
<          FEerror("Caught fatal error [memory may be damaged]",0); }
<       printf("\nUnrecoverable error: %s.\n", s);
<       fflush(stdout);
---
>          printf("\nError: %s.\n", s);
>          FEerror("Caught fatal error [memory may be damaged]",0); }
>     printf("\nUnrecoverable error: %s.\n", s);
>     fflush(stdout);
353c377
<       abort();
---
>     abort();
538c562,565
<   error("Segmentation violation.");
---
> #if 1
>  /* We want to start the debugger then... */
>  error("Segmentation violation.");
> #endif

Index: o/unexnt.c
===================================================================

Haven' looked at this in detail, but whatever you want to do here is
fine I'm sure.  

In general, with all the win specific files, I'd really appreciate if
you and dan and others with access could take free reign.   changes to
main.c et.al. we should probably discuss.  What do you think?


RCS file: /cvsroot/gcl/gcl/o/unexnt.c,v
retrieving revision 1.5
diff -r1.5 unexnt.c
33a34,35
> #include <sys/stat.h>
> #include <errno.h>
71a74
> extern char *core_end;
73c76
< #include "ntheap.h"
---
> /*#include "ntheap.h"*/
103c106,109
<   
---
> 
> #if 0  
>   fprintf ( stderr, "recreate_heap1: Started %s.\n", executable_path );
> #endif  
107,108c113,114
<       printf ("Failed to find path for executable.\n");
<       exit (1);
---
>         fprintf ( stderr, "recreate_heap1: Failed to find path for executable 
> %s.\n", executable_path );
>         exit (1);
218a225
>   struct _stat st;
233a241,259
> #ifndef __CYGWIN32__
>   strcpy (in_filename, old_name);
>   ptr = in_filename + strlen (in_filename) - 4;
>   if  (strcmp (ptr, ".exe") && strcmp (ptr, ".EXE")  )
>     strcat (in_filename, ".exe");
> 
>   /* It might be possible that gcl has changed directory,
>      so we use the module filename in this case. (rk) */
> 
>   if(_stat(in_filename, &st) < 0 && errno == ENOENT)
>     {
>       GetModuleFileName(NULL, in_filename, sizeof(in_filename));
>     }
> 
>   strcpy (out_filename, new_name);
>   ptr = out_filename + strlen (out_filename) - 4;
>   if (strcmp (ptr, ".exe") && strcmp (ptr, ".EXE")  )
>     strcat (out_filename, ".exe");
> #else
242a269
> #endif
244,245c271
<   printf ("Dumping from %s\n", in_filename);
<   printf ("          to %s\n", out_filename);
---
>   printf ("Dumping from %s to %s\n", in_filename, out_filename);
314a341,342
>   fprintf(stderr, "\nSize of Image: %d\n", GetFileSize(out_file.file, NULL));
> 
938c966,967
<       reserved_heap_size = end - base;
---
>       reserved_heap_size = W32_MAX_RESERVED_HEAP_SIZE;
>       /*reserved_heap_size = end - base;*/
944a974,977
>   DBEGIN = ptr;
> #if 0  
>   fprintf ( stderr, "allocate_heap: DBEGIN(_dbegin) = %x, reserved size = 
> %x\n", DBEGIN, get_reserved_heap_size() );
> #endif  
946c979,980
<   reserved_heap_size = end - base;
---
>   reserved_heap_size = W32_MAX_RESERVED_HEAP_SIZE;
>   /*reserved_heap_size = end - base;*/
950a985
>   DBEGIN = ptr;
963c998,1000
<   
---
> #if 0  
>   fprintf ( stderr, "sbrk: allocating %x, data_region_base %x, UNINIT_PTR 
> %x\n", increment, data_region_base, UNINIT_PTR );
> #endif  
968,969c1005,1009
<       if (!data_region_base)
<       return NULL;
---
>       if (!data_region_base) {
>         MessageBox(NULL, "Cannot allocate heap", "Error", MB_OK);
>           exit ( 1 );
>           /*return NULL;*/
>       }
1033c1073,1075
<   
---
> #if 0
>   fprintf ( stderr, "sbrk: returning %x\n", result );
> #endif  
1043c1085,1087
< 
---
> #if 0
>   fprintf ( stderr, "recreate_heap: Starting for %s.\n", executable_path );
> #endif
1096a1141,1142
> {
> }



> Regards
> 
> Mike Thomas.
> 

Take care,


-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

[Prev in Thread] Current Thread [Next in Thread]