View previous topic :: View next topic |
Author |
Message |
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Tue Feb 01, 2011 8:34 pm Post subject: Question about trace |
|
|
Hi DB!
I am assuming that when I use the trace, the slowdown of the program is mainly caused by the logging, and not by the tracing itself. So in theory the trace could be speed up if I would use some filter to not log all instructions, only those that are important for me.
Am I able to specify somehow (in lua or otherwise) to log specific instructions only? Like log only call and ret instructions or only cmp or jump instructions. Would this grant enough speed to be able to work with the target process while the debugger is running and tracing those instructions?
Thanks!
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Tue Feb 01, 2011 9:15 pm Post subject: |
|
|
nope, actually stepping through will slow it down to a crawl.
Just tested it with this script: (Won't work in ce 6.0 because of a bug where the continue option is not properly set: bypass, do at least one single step and then run the script and do another single step yourself)
Code: |
i=5000
function debugger_onBreakpoint()
i=i-1;
if (i==0) then
debug_continueFromBreakpoint(0) --run
return 1
end
debug_continueFromBreakpoint(1) --step into
return 1
end
|
It takes several seconds to run (about 300 iterations a second)
This is due to message events sent during debugging, and the cpu prediction is useless in this case and several other factors that will slow it down
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Tue Feb 01, 2011 9:31 pm Post subject: |
|
|
Thanks. I was thinking that filtering the logging may actually speed up the debugging process. Usually I just look for specific things like function entry points, jumps and other interesting things so the rest of the instructions are kinda useless for me anyway in 90% of the cases. I was thinking I could log larger parts of the application not just a few thousands of code lines if I use some filtering, but then I will just stick to a few ten thousands of codes and wait a few minutes for the result.
It is still working like a charm and navigating in functions with the trace tree is a dream. It was one of Your best ideas to implement that feature.
_________________
|
|
Back to top |
|
|
|