250+ TOP MCQs on GDB Debugger and Answers

Linux / Unix questions and answers focuses on GDB. This is set 1.

1. Which one of the following is not true about GDB?
a) quit command is used to exit the GDB
b) kill command is used to stop execution in GDB
c) if the execution is stopped by kill command then it can not be started again
d) none of the mentioned

Answer: c
Clarification: None.

2. While debugging with GDB
a) variables can be print
b) variables can be modify
c) variables can be print & modify
d) none of the mentioned

Answer: c
Clarification: None.

3. GDB command “frame” is used
a) to change the stack frames
b) to check the stack frames only
c) it is not a valid command
d) none of the mentioned

Answer: a
Clarification: None.

4. The GDB command “info local”
a) displays the list of local variables
b) value of local values for the current stack frame
c) displays the list of local variables & value of local values for the current stack frame
d) none of the mentioned

Answer: c
Clarification: None.

5. If we have multiple source files, then during the debugging with GDB
a) breakpoint can not be set
b) break point can be set by “break” command with a filename
c) break point can be set only to makefile
d) none of the mentioned

Answer: b
Clarification: None.

6. What is temporary breakpoint?
a) it stops the program once
b) it is removed after one execution of the program
c) it stops the program once & removes after one execution of the program
d) none of the mentioned

  250+ TOP MCQs on Signal Handling and Answers

Answer: c
Clarification: None.

7. In GDB breakpoints can be skipped by the command
a) ignore
b) reject
c) skip
d) none of the mentioned

Answer: a
Clarification: None.

8. Which GDB command is used to examine the memory?
a) x
b) y
c) z
d) none of the mentioned

Answer: a
Clarification: None.

9. Which one of the following is not true about the GDB?
a) info register is used to see that what is in the processor registers
b) processor registers can not be accessed by GDB
c) first 32 bits of the variable can not be examined
d) none of the mentioned

Answer: c
Clarification: None.

10. Assemble code of the program can be displayed in GDB by the command
a) disassemble
b) assemble
c) assembly
d) none of the mentioned

Answer: a

Leave a Comment

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

Scroll to Top