Recently, in an s60 3rd project, I debugged a memory leak error, but I still cannot find the problem. I thought that I had encountered a hooklogger tool to detect memory leaks, So I downloaded it. After trying it out, it worked quite well and soon found the location where the error occurred. The following describes how to install and use hooklogger in s60 3rd environment:
1. Download:
Http://developer.symbian.com/main/downloads/files/HookLogger_Setup.zip
2. Installation: (assuming s60 3rd Mr is used)
Decompress hooklogger_setup.zip and run the installation program. Install the program by default.
If hooklogger is used in s60 3rd, some problems may occur. The modification is as follows:
1) in the environment variable settings of the system, add the environment variable epocroot, whose value is/Symbian/9.1/s60_3rd_mr/
2) open the file in Notepad
C:/program files/common files/Symbian/tools/hookeuser. pl
Replace
My $ cmd = "Copy $ hooks_src ";
Is
My $ cmd = "copy/" $ hooks_src /"";
And Replacement
$ Cmd = "$ bin/attachdll $ euser $ hooks $ hooked_euser ";
Is
$ Cmd = "/" $ bin/attachdll/"$ euser $ hooks $ hooked_euser ";
Save and exit.
3) open a console (DOS window) and change the current directory:
C:/program files/common files/Symbian/tools
Then run
Hookeuser winscw
3. Usage:
Start hooklogger first, and then start emulator. Run your program and reproduce the memleak until it exits unexpectedly. Go to the heap page of hooklogger and click "list all allocs" to list the addresses with memory leaks. Double-click a piece of information to view details. You can even open the source code file, which is very convenient!
For details, refer to [NOTE 2].
4. Uninstall:
Refer to 2.3 for running
Hookeuser-r winscw
Rating: hooklogger is a good tool that helps you quickly locate problems when there is no clue about memory leaks.
Http://developer.symbian.com/main/tools/devtools/code/index.jsp#debugging [NOTE 1]
[NOTE 2] http://www.symbian.net.cn/blog/post/5.html