Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windbg: Creating log of function entry and exit

Tags:

windbg

I wish to create log of function entry and exit for my code. I am using the following command in WinDbg- Function name and the return value

bm <module_name>!* "kcL1;.echotime;gu;r eax;.echotime;gc;"

Now I wish to do this for all the modules of the function but I don't want to write the code again for each module. Is there some way to specify bm to read module names from a file which I create using "lm" and set breakpoint for each module or something even more simple.

Also, how can I specify bm to not print the output on the screen? I am using a log file.

Sometimes I don't see the time for call exit. What can be the reason for this? How can I correct it?

like image 983
Bruce Avatar asked Apr 15 '11 18:04

Bruce


1 Answers

you can use !for_each_module

You will not see call exit time if another breakpoint is hit (in another thread, or if the funciton calls other functions that have breakpoints)

like image 117
John Avatar answered Oct 08 '22 04:10

John