![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stop execution of script with in the script | dsdev_123 | AIX | 3 | 03-20-2008 11:57 AM |
| how to stop others users to stop viewing what i am doing ? | mobile01 | UNIX for Advanced & Expert Users | 5 | 12-04-2006 08:37 AM |
| How do I stop this??? | Cameron | Filesystems, Disks and Memory | 8 | 07-11-2002 12:10 AM |
| how to get the similar function in while loop or for loop | trynew | Shell Programming and Scripting | 3 | 06-17-2002 11:09 AM |
| Stop a SAS job | cube | UNIX for Dummies Questions & Answers | 1 | 05-02-2002 11:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to stop execution in for loop
Hi all,
I am working on a c source code nearly 2000 line . it contains one big for( i=0; i< 200 ; i++ ) loop of around 600 lines could any tell me how to break the execution of prog when the value of i is 50 in for loop so that i can check inside the loop. Thanks.. |
|
||||
|
Do you mean in a debugger?
One pretty good way is to recompile the program with the following somewhere in the loop... Code:
if (i==50) { ((void **)0)[0]=0; }
Otherwise do similar but just have a line that you can set a break point on.. Code:
if (i==50)
{
i; /* set breakpoint here */
}
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|