Starting with MonoTouch 5.4 it is possible to use Valgrind on a MonoTouch project. In some cases Valgrind is invaluable in finding strange crashes, in particular when freed memory is accessed.
This is what you need to do:
Download latest Valgrind (3.7.0 as of this writing). Extract somewhere, and compile:
./configure --enable-only32bit --prefix=/usr/local
make
sudo make install
Now open the project you want to valgrind, and set the VALGRIND environment variable to the command to execute to use valgrind:
![Inline image 1](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXQl24iriXqtrWvQi-602yQPf9nfsTaRwn0LHlM9W-0yk9q5qBcUxshQJ7AEZxxCv9DF6gSucoYgl0vA3oGr9nMG_WJydHgyMXH3wiOdJW6uck4ZXjRgDOaY9WQBXmoVK1S1ZKnA/s1600/valgrind-in-md.png)
Run (not debug) your project. You will see this in the Application Output:
![Inline image 2](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpey8agGVNANs7z6p-5V_tDPVT65T4TlaGe2ybp4lqRCXqshbPcGsMgKQOFSku3fELpo4F-hWj5T2aNg1OAMczC96_zyaQXLuU-Jp2fnZAG3rdZjJ2rq7rmT8673XNryJCp4tI9A/s1600/valgrind-gdb.png)
Read more: To Infinity and Beyond
QR: ![Inline image 3](http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://rolfkvinge.blogspot.co.il/2012/09/valgrind.html)
0 comments:
Post a Comment