What is the difference between the gdb commands step and next? Give an example to explain your answer.
What will be an ideal response?
The step command to used to execute the next line of code. If that command is a function then the command will result in the debugger stepping in to the function and waiting for the user to issue a command to execute the rest of the code in the function. If the next command is used, and the next line in the code is a function, it skips over the function without going into the function and executes the whole function. For example if the next line to be executed in the code being debugged is:
getinput(user_in);
The step command will result in the debugger going into the function and awaiting the users command before executing the code.
On the other hand if next is used, it will result in the whole function being executed and the debugger will stop on the line after this function call (in this case getinput()).
You might also like to view...
Which of the following statements is false?
a. An exception indicates a problem that occurs while a program executes. b. Exception handling enables you to create fault-tolerant programs that can resolve (or handle) exceptions—in many cases, this allows a program to continue executing as if no problems were encountered. c. The catch block contains the code that might throw an exception, and the try block contains the code that handles the exception if one occurs. d. Inside the catch block, you can use the parameter’s identifier to interact with a caught exception object.
_____ is the simultaneous execution of the same task on multiple processors to obtain results faster.
Fill in the blank(s) with the appropriate word(s).
What is TextWrangler?
What will be an ideal response?
A(n) ____________________ program is software that lets you manipulate and make changes to a digital image.
Fill in the blank(s) with the appropriate word(s).