Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Dr. Memory
MortenMacFly:
--- Quote from: oBFusCATed on February 28, 2012, 10:11:23 am ---Does TDM's g++ 4.5.x produce dwarf2 symbols?
--- End quote ---
I don't know about TDM's g++ 4.5.x, but TDM's g++ 4.6.x do (of course, you'll need to d/l the DWARF version).
oBFusCATed:
I think that I'm using the dw2 version of 4.5.x.
MortenMacFly:
--- Quote from: oBFusCATed on February 28, 2012, 10:35:32 am ---I think that I'm using the dw2 version of 4.5.x.
--- End quote ---
OK - the final DrMemory release with official MinGW support is out. I did a small sample:
--- Code: ---#include <cstdlib> // malloc
#include <iostream>
void func2(int* the_old_i, int the_new_i)
{
std::cout << "Now in func2!" << std::endl;
*the_old_i = the_new_i;
std::cout << "Now leaking " << sizeof(double) << " bytes w/ malloc..." << std::endl;
double* d = static_cast<double*>( malloc(sizeof(double)) );
}
void func1(int* i)
{
std::cout << "Calling func2()" << std::endl;
func2(i, 42);
std::cout << "Now leaking 42 bytes w/ malloc..." << std::endl;
void* v = malloc(42);
}
int main(int argc, char **argv)
{
std::cout << "Calling func1()" << std::endl;
int* i = new int;
func1(i);
std::cout << "Now leaking " << sizeof(int) << " bytes w/ new..." << std::endl;
return 0;
}
--- End code ---
And that's the report I am getting:
Dr. Memory version 1.4.6 build 2 built on Mar 7 2012 10:14:04
Application cmdline: ""C:\Devel\DrMemory\bin\drmemory_test.exe""
Recorded 62 suppression(s) from default C:\Devel\DrMemory/bin/suppress-default.txt
Error #1: POSSIBLE LEAK 58 direct bytes 0x003f2cd0-0x003f2d0a + 0 indirect bytes
# 0 msvcrt.dll!lock
# 1 msvcrt.dll!_getmainargs
# 2 __mingw_CRTStartup [../mingw/init.c:60]
# 3 mainCRTStartup [../mingw/crt1.c:264]
# 4 KERNEL32.dll!RegisterWaitForInputIdle
Error #2: LEAK 4 direct bytes 0x003f2e28-0x003f2e2c + 0 indirect bytes
# 0 operator new()
# 1 main [C:\Devel\DevPacks\DrMemory\bin/drmemory_test.cpp:25]
Error #3: LEAK 8 direct bytes 0x003f2e58-0x003f2e60 + 0 indirect bytes
# 0 func2() [C:\Devel\DrMemory\bin/drmemory_test.cpp:10]
# 1 std::ws<>()
# 2 func1() [C:\Devel\DrMemory\bin/drmemory_test.cpp:16]
# 3 main [C:\Devel\DrMemory\bin/drmemory_test.cpp:26]
Error #4: LEAK 42 direct bytes 0x003f2e88-0x003f2eb2 + 0 indirect bytes
# 0 func1() [C:\Devel\DrMemory\bin/drmemory_test.cpp:19]
# 1 std::ws<>()
# 2 main [C:\Devel\DrMemory\bin/drmemory_test.cpp:26]
DUPLICATE ERROR COUNTS:
SUPPRESSIONS USED:
ERRORS FOUND:
0 unique, 0 total unaddressable access(es)
0 unique, 0 total uninitialized access(es)
0 unique, 0 total invalid heap argument(s)
0 unique, 0 total warning(s)
3 unique, 3 total, 54 byte(s) of leak(s)
1 unique, 1 total, 58 byte(s) of possible leak(s)
ERRORS IGNORED:
202 still-reachable allocation(s)
(re-run with "-show_reachable" for details)
Details: C:\Devel\DrMemory/drmemory/logs/DrMemory-drmemory_test.exe.6988.000/results.txt
Nice, isn't it???
ollydbg:
--- Quote from: MortenMacFly on March 29, 2012, 07:54:49 am ---
--- Quote from: oBFusCATed on February 28, 2012, 10:35:32 am ---I think that I'm using the dw2 version of 4.5.x.
--- End quote ---
OK - the final DrMemory release with official MinGW support is out. I did a small sample:
Nice, isn't it???
--- End quote ---
VERY nice! I have never used it, I will try to download one from http://drmemory.googlecode.com/files/DrMemory-Windows-1.4.6-2.zip and test it. :)
Navigation
[0] Message Index
[*] Previous page
Go to full version