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

[MiNT] gcc-4.5.0-mint-20100511



Hello.

I have updated the GCC patch to enable some nice debugging facilities:
- the -fstack-protector-all option for buffer overflow checking.
- mudflap for advanced runtime checks and reporting.

These features even work on plain TOS :-)

The Cygwin and Ubuntu binaries are available at the usual place:
http://vincent.riviere.free.fr/soft/m68k-atari-mint/

For Cygwin, I have removed the cross-mint-all-light simplified package, because it was a bad idea from the beginning. Instead, I have made a nice graphical installer which should work just as you expect :-)

Now some advanced information about the debugging features:

1) Stack Protector
Compile with -fstack-protector-all
If the stack is damaged by some bad code, the following message will be displayed:
*** stack smashing detected ***: myprog.tos terminated

More information:
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Optimize-Options.html#index-fstack_002dprotector-839

2) mudflap
Compile and link with -fmudflap -lmudflap ad the end of the command line.
If some illegal memory location is accessed, it will display a detailed message like this:
*******
mudflap violation 1 (check/write): time=1274143433.075007 ptr=0x15d47ce size=12
pc=0x14c5aa8 location=`(memset dest)'
      [0x0x14c462c]
Nearby object 1: checked region begins 0B into and ends 2B after
mudflap object 0x1105b54: name=`helbad.c:6:7 (main) buf'
bounds=[0x15d47ce,0x15d47d7] size=10 area=stack check=0r/3w liveness=3
alloc time=1274143433.075006 pc=0x14c4ea4
number of nearby objects: 1

More information:
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Optimize-Options.html#index-fmudflap-682
http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging

Enjoy !

--
Vincent Rivière