GDB Debugger Questions & Answers – 5

DigitalOcean Referral Badge DigitalOcean Referral Badge

1.

In GDB, a tracepoint can be set by the command

   A.) trace
   B.) set
   C.) break trace
   D.) none of these

Answer: Option 'A'

trace

DigitalOcean Referral Badge

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 these

Answer: Option 'C'

set history save on

DigitalOcean Referral Badge

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 these

Answer: Option 'A'

displays the last 10 commands in the command history

DigitalOcean Referral Badge

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 these

Answer: Option 'B'

displays the current default base for numeric display

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

5.

The user can define a command for GDB with the command

   A.) define
   B.) command
   C.) assign
   D.) none of these

Answer: Option 'A'

define

DigitalOcean Referral Badge

6.

By default the GDB automatically executes the command from its

   A.) init files
   B.) start files
   C.) begin files
   D.) none of these

Answer: Option 'A'

init files

DigitalOcean Referral Badge

7.

The GDB text user interface uses the ____ library to show the source file.

   A.) Curses
   B.) YUI
   C.) JUI
   D.) None of these

Answer: Option 'A'

Curses

DigitalOcean Referral Badge

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 these

Answer: Option 'A'

select-frame

DigitalOcean Referral Badge

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 these

Answer: Option 'A'

clear

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

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 these

Answer: Option 'B'

set

DigitalOcean Referral Badge

GDB Debugger Questions & Answers – 5 Download Pdf

Recent Posts