Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

VESAMTTR (recovered from Google) (DOSX)

posted by Rugxulo Homepage, Usono, 06.09.2007, 04:40

> Yes dude, you was right. -fomit-frame-pointer made the evil, it works with
> -Os -O2 -O6 well. Could you explain what -fomit-frame-pointer does resp.
> how it can make crashes?

Try using -fomit-frame-pointer -masm=intel -S -o myfile.asm and comparing it vs. without the -fomit-frame-pointer option. Basically, GCC always creates a stack frame (which, if absent, can save some bytes but makes debugging much much harder if not impossible). Actually, I think -Os and similar are documented to always use -fomit-frame-pointer unless it interferes with debugging (which I personally thought was kinda a copout for not working like documented but whatever).

Basically, if you screw with the stack, it can mess up and crash, so don't do it. (And GCC ain't your friend if you want really small code.)

---
Know your limits.h

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 301 users online (0 registered, 301 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum