250+ TOP MCQs on GDB Debugger and Answers

Linux / Unix questions and answers focuses on GDB. This is set 5.1. In GDB, a tracepoint can be set by the command
a) trace
b) set
c) break trace
d) none of the mentioned

Answer: a
Clarification: None.

2. Which one of the following command saves the command history of GDB in a file?
a) history
b) set history
c) set history save on
d) none of the mentioned

Answer: c
Clarification: None.

3. The command “show commands” of GDB
a) displays the last 10 commands in the command history
b) displays all commands of the command history
c) displays all the commands available in GDB
d) none of the mentioned

Answer: a
Clarification: None.

4. The GDB command “show output-radix”
a) sets the default base for numeric display
b) displays the current default base for numeric display
c) sets the default base
d) none of the mentioned

Answer: b
Clarification: None.

5. The user can define a command for GDB with the command
a) define
b) command
c) assign
d) none of the mentioned

Answer: a
Clarification: None.

6. By default the GDB automatically executes the command from its
a) init files
b) start files
c) begin files
d) none of the mentioned

Answer: a
Clarification: None.

7. The GDB text user interface uses the ____ library to show the source file.
a) Curses
b) YUI
c) JUI
d) None of the mentioned

Answer: a
Clarification: None.

8. Which one of the following GDB command allows to move from one stack frame to another without printing the frame?
a) select-frame
b) frame
c) frame move
d) none of the mentioned

Answer: a
Clarification: None.

9. Which one of the following GDB command deletes any breakpoint at the next instruction to be executed in the selected stack frame?
a) clear
b) delete
c) disable
d) none of the mentioned

Answer: a
Clarification: None.

10. The result of an expression can be assigned to an environement variable with the command
a) assign
b) set
c) env
d) none of the mentioned

Answer: b

Leave a Reply

Your email address will not be published. Required fields are marked *