Friday, February 27, 2009

Hook Logger Setup

HookLogger
It is one of the most time consuming task for developers to find memory leaks in their code. If your application happens to panic on exit with some memory leak, then sometimes it is a hard work to find the wrong piece of code with code analysis. HookLogger is a great emulator tool by Symbian that helps finding the leak fast.






Install



*Read carefully*


* Latest version can be download from nokia website also


* Install HookLogger to path *without* spaces (c:\s60\hooklogger). Hooklogger must be installed to the same drive as SDK.


* In DOS prompt, do following:


** cd \utils\hooklogger


** type SetupHooks.cmd devicename


devicename can be found, by typing devices in the command prompt


My device is S60_5th_Edition_SDK_v0.9:com.nokia.s60


* On successful hooklogger setup you will get the following information in the command prompt


Setting up hooks in "C:\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32\release\WINSCW\UDEB"


1 file(s) copied.


Setup euser.dll to load EUserParasite_EKA2.dll, original preserved as euser.orig.dll.


Run SetupHooks with --r to restore it


* Once you are done with the usage of hooklogger you just restore your euser.dll by typing


SetupHooks.cmd --r devicename





Running the Program with hooklogger


* Open the hooklogger


* Select filters tab


* click "Browse for exe"


* select the application to be monitored


* Make sure you have selected "include only checked"


* Now launch your application


* Once the emulator is launched you can see the hooklogger heading is changed to your application executable's directory


* Run your application, do some operation and close it


* Now in hook logger, you can select heap tab.


* Say list all and it shows all the heap allocations


* If you double click on any of the entry it shows the callstack of that allocation


* This will be useful to find out the memory leaks (alloc panics)

Read More......
 
Template design by Amanda @ Blogger Buster