I want to stop the execution, when the loop has been executed n number of times. I don't want to use the conditional breakpoint using value of loop-counter because initial value of loop-counter is different at different time of run.
            Asked
            
        
        
            Active
            
        
            Viewed 1,137 times
        
    3
            
            
        - 
                    3Will this do what you want? [stackoverflow.com: how to set a 'counter' for a GDB breakpoint](http://stackoverflow.com/questions/2956889/how-to-set-a-counter-for-a-gdb-breakpoint) – Mark Plotnick Feb 11 '14 at 11:57
 
1 Answers
4
            You need to use the ignore command.  Set a breakpoint at the relevant place in your loop and then use ignore to indicate how many times that the breakpoint is to be ignored.
Syntax, as per help ignore is:
Set ignore-count of breakpoint number N to COUNT. Usage is `ignore N COUNT'.
        borrible
        
- 17,120
 - 7
 - 53
 - 75