1. The execution of the program in GDB can be affected by
a) arguments
b) working directory
c) environment
d) all of the mentioned
Answer: D
Explanation:
None
2. While debugging with GDB, arguments to the program can be specified by the arguments of _____ command.
a) run
b) gdb
c) make
d) none of the mentioned
Answer: A
Explanation:
None
3. Inside GDB, a program may stop because of
a) a signal
b) a breakpoint
c) step command
d) all of the mentione
Answer: D
Explanation:
None
.
4. Which one of the following is a special breakpoint that stops the program when the value of an expression changes in GDB?
a) watchpoint
b) catchpoint
c) getpoint
d) none of the mentioned
Answer: A
Explanation:
None
5. With the list command, by default GDB prints the ____ source lines.
a) 20
b) 10
c) all
d) none of the mentioned
Answer: B
Explanation:
None
6. In GDB which one of the following allows us to specify a variable in terms of the file or function where it is defined?
a) ::
b) @
c) $
d) none of the mentioned
Answer: A
Explanation:
None
7. If we want to print the value of a variable in hexadecimal, we have to use “print” command with the option ___ in GDB.
a) x
b) h
c) hex
d) none of the mentioned
Answer: A
Explanation:
None
8. Which one of the following variables is used within GDB to hold on to a value and refer to it later?
a) convenience variables
b) environment variables
c) temporary variables
d) none of the mentioned
Answer: A
Explanation:
None
9. In GDB, we can refer to machine register contents, in expressions, as variables with names starting with
a) $
b) #
c) !
d) none of the mentioned
Answer: A
Explanation:
None
10. In GDB hardware-dependent information about the floating point unit can be displayed by the command
a) info float
b) display float
c) show float
d) none of the mentioned
Answer: A
Explanation:
None
- File Permissions – 1 : Linux TOP MCQs With Answers
- File Permissions – 2 : Linux TOP MCQs With Answers
- Search Pattern : Linux TOP MCQs With Answers
- Functions in Linux Shell Programming : Linux TOP MCQs With Answers
- VI Editor : Linux TOP MCQs With Answers
- Linux Proc Filesystem 3 : Linux TOP MCQs With Answers
- Linux Proc Filesystem 4 : Linux TOP MCQs With Answers
- Shared Libraries : Linux TOP MCQs With Answers