RE: why are conditional breakpoints SO SLOW?
RE: why are conditional breakpoints SO SLOW?
- Subject: RE: why are conditional breakpoints SO SLOW?
- From: "Dallman, John" <email@hidden>
- Date: Tue, 18 Mar 2014 15:43:49 +0000
- Thread-topic: why are conditional breakpoints SO SLOW?
> If I turn off that one conditional breakpoint, the code finishes (with the error)
> instantly. How can a trivial conditional breakpoint be this incredibly slow?
Sadly, that is quite easy. The way conditional breakpoints work is that the breakpoint
instruction is put into the code, and the app starts. Each time the breakpoint is hit,
it is looked up, found to be a conditional breakpoint, expression is evaluated, and
found to be false, the count is incremented, the replaced instruction is run, and then
the app is resumed. This is happening 1.5 million times.
You can do this much more efficiently by changing your code a little: put something
like this in the code for the loop over the bytes:
if( offset == 1512800)
{
((write some code to print something in a way suitable to your app))
}
then set your breakpoint on the code in the block. This will run much faster, because
it does the counting in the app code, without having to trap into the debugger and
do interpreted stuff there.
--
John Dallman
-----------------
Siemens Industry Software Limited is a limited company registered in England and Wales.
Registered number: 3476850.
Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden