Re: Building my own 'freestanding' start-up and library



On Tue, 21 Oct 2008 11:19:46 -0700, I waved a wand and this message
magically appears in front of Nate Eldredge:

Botheration, I hadn't thought to debug __write! Thank you very much
for taking the trouble to track down the problem for me, it's much
appreciated.

No problem, it was interesting.

I fixed it this morning; once I knew that it was clobbering ebx, by
adding some prologue and epilogue code, and I also realised that if
you push more values onto the stack, you need to add the number of
bytes so you can access the variables that has also been pushed onto
the stack by the caller. It's quite fundamental and I had neglected to
take this into account!

Obviously I need to disable this behaviour in GCC, thanks once
again.

Why? I don't see how it can cause a problem, and it may help in terms
of performance.

No matter, I realised after this that I wouldn't need to.

Thanks
--
http://www.munted.org.uk

Fearsome grindings.

.



Relevant Pages

  • Re: RfD: !ME and @ME
    ... Thus to persist LOCALS, they have ... or carried on the stack. ... Trouble is, if I expand the idea, it would be seen as even more ... variable 'local-storage ...
    (comp.lang.forth)
  • Re: Mysterious crash in LIBC06B4.DLL
    ... function without trouble, the function completes... ... the instant it tries to return to the calling procedure. ... As expected with stack memory overrun. ...
    (comp.os.os2.programmer.misc)
  • Re: [OT] PostLisp, a language experiment
    ... > optional unless they must override precedence. ... > the correct number of arguments, so if there is mismatch, the user stack ... If you're having trouble with stack errors you're ...
    (comp.lang.lisp)
  • Re: systematic debugging of random freeze in debug mode
    ... > even though I found what causes the trouble, Interestingly, I found ... unrelated system code runs on the others. ... switch to it and you'll get correct call stack. ... With sufficient thrust, pigs fly just fine. ...
    (microsoft.public.vc.language)
  • Re: current function / sub name ?
    ... I think the trouble I was having ... Use Exceptions - you can get a full call stack... ...
    (microsoft.public.dotnet.languages.vb)