Category Archives: debug

Solution to valgrind: failed to start tool memcheck/callgrind

Background: I need to run memcheck/callgrind on a system without privilege to install software, so I build valgrind from source code. Valgrind-3.12.0.tar.bz2 on Ubuntu 14.04 trusty tar xf valgrind-3.12.0.tar.bz2 ./configure make onegazhang@trusty:~/oss/valgrind-3.12.0$ VALGRIND_LIB=/home/onegazhang/oss/valgrind-3.12.0 coregrind/valgrind valgrind: failed to start tool ‘memcheck’ … Continue reading

Posted in CPP, debug, Open Source | Leave a comment

call stack of unhandled std::bad_alloc thrown by operator new

0:000> k ChildEBP RetAddr 0012d2c0 7c90df4a ntdll!KiFastSystemCallRet 0012d2c4 7c809590 ntdll!ZwWaitForMultipleObjects+0xc 0012d360 7c80a115 kernel32!WaitForMultipleObjectsEx+0x12c 0012d37c 6945763c kernel32!WaitForMultipleObjects+0x18 0012dd10 694582b1 faultrep!StartDWException+0x5df 0012ed84 7c864526 faultrep!ReportFault+0x533 0012eff8 785922fa kernel32!UnhandledExceptionFilter+0x55b WARNING: Stack unwind information not available. Following frames may be wrong. 0012f330 7857bb47 MSVCR90!abort+0x10f 0012f360 … Continue reading

Posted in CPP, debug | Leave a comment

DevPartner 10.5.786.0 cause debuggee error 0x80080003

Run my application under Error Detection mode in DevPartner, my application reported 80080003 error when trying to access some COM object in ROT.

Posted in debug | Leave a comment

Purify reported error entry point _resetstkoflw could not be located

————————— MyApplication$Purify_N_bin.exe – Entry Point Not Found ————————— The procedure entry point _resetstkoflw could not be located in the dynamic link library !Pmvrt.dll. ————————— OK ————————— This is fixed by deleting MFC42.dll and MSVCRT.dll under the working directory of MyApplication.

Posted in debug | 1 Comment

find out which process locked a file

There are several tools for this purpose. Unlocker is a GUI tool and I like the portable version. Handle.exe By Mark Russinovich is a command line tool. c:\tools\handle -p notepad.exe | grep O-Drive c:\tools\handle -a | grep O-Drive c:\tools\handle -a | grep … Continue reading

Posted in debug | Leave a comment

self debugging on XP

It is nice to save some useful information at the point of application crash. The useful methods including call stack and minidump file. Call stack can be obtained by installing exception filter via  AddVectoredExceptionHandler Function, stack trace can be obtained … Continue reading

Posted in debug | Leave a comment

DevPartner 9.02 coverage analysis

DevPartner failed to instrument two projects with “Error and Coverage” type, the only common fact is that there is a medium size CPP file in thos projects, one is around 40k, another is around 64k. It seems to be bug … Continue reading

Posted in debug | Leave a comment