Re: Compiling Euphoria 3+ for non-x86 targets

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mark Brown wrote:
> Matt wrote:
> > Now that we've got everything in subversion, we have a detailed diff
> record
> > of what has changed.  You can get these through svn commands.
> 
> Thanks for the info Matt. I probably should have checked the list archive
> for that before posting... haven't read the list much of late.
> 
> Regarding the seg fault I'm getting, I've tracked it down to symtab.e in
> procedure InitSymTab(). Specifically the crash occurs at the line "while
> SymTab[s][S_SAMEHASH] != 0 do"

You aren't very far into the interpreter initialization.
The fact that it crashed at that line doesn't give
me any clues.

> That line doesn't look weird in any way to me, except that I think it is the
> first instance of a "while" being used in the eu code. I'm a bit scared of
> that as I'm guessing that means that my compiled eu while loops are broken.

That probably isn't the problem.
I'd be more worried about maybe the storage
allocation system (i.e. malloc()). I make some dirty assumptions
about how C's malloc() works internally on each platform.

> Rob, could you perhaps point me in a direction to look for this. Is this
> sort of thing all still in the C source or is some of this translated
> euphoria code? If it is a problem with the compile in the C source, has that
> changed since 2.4? (I have no problems with any of that in 2.4 on the
> Zaurus.)
> 
> If I remove all compiler optimisations, the resulting interpreter seg faults
> immediately.

The front-end is now all Euphoria code, so you have
to translate it to C, before porting the front-end and back-end
C files to a new platform. The translation should be done on a 
platform similar to the one you are porting to.
It sounds like you've done all that. I doubt that there
are bugs in the translation of simple constructs like "while".
I'd be more worried about differences in the C run-time code
between the two platforms. i.e. malloc(), and the start-up code
for translated programs. I also wonder if C global data is initialized
to 0, like it is on Linux. I might have used that fact in a few places,
though I generally try not to assume that.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu