GDB Debugger Questions & Answers – 5

This set of 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: None.
advertisement
advertisement

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

Answer: a
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: a
Explanation: None.
advertisement

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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: None.
advertisement

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.
Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.

To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.