|
-
January 14th, 2010, 12:14 PM
#1
How to pause a program in the command window?
I am writing a program without GUI, simple console program.
How can I pause the program? For example, while the program is running in the command window, press some key, and modify some parameter and let the program continue to run.
-
January 14th, 2010, 12:34 PM
#2
Re: How to pause a program in the command window?
 Originally Posted by isulsz
I am writing a program without GUI, simple console program.
How can I pause the program? For example, while the program is running in the command window, press some key, and modify some parameter and let the program continue to run.
Can you give me an example of a program that does what you're describing? Or at least clarify what you're trying to accomplish?
Regards,
Paul McKenzie
-
January 14th, 2010, 01:01 PM
#3
Re: How to pause a program in the command window?
You may accomplish what you need by running your executable with a debugger -- for instance "gdb" (it comes free from gnu) that runs at the command prompt. It is very simple to use at console:
example
>gdb a.out
You can pause your program within a debugger run, by setting a breakpoints(pause at a certain line number or function call in your source code) or watchpoints(pause when a condition changes). Debugger will let you modify the value of variables and continue execution. You can also backtrace (within the function calls stack) within a debugger.
-
January 16th, 2010, 05:25 PM
#4
Re: How to pause a program in the command window?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|