In Xcode, there is the possibility to use the so called guard malloc flag, to simplify debugging malloc and pointers stuff.
I wonder how can I use that flag on Qt Creator, when debugging.
In man pages they give the example of using it with gdb:
% cc -g -o gmalloctest gmalloctest.c
% gdb gmalloctest
Reading symbols for shared libraries .. done
(gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib
(gdb) r
How do I tell Qt Creator to "set env" when debugging?
You can set environment variables in Creator's project Run Settings panel: http://doc.qt.nokia.com/qtcreator-2.4/creator-run-settings.html
Expand "Run Environment" to add/edit variables. They are set when you run/debug your project.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.