Gdb Debugger Flashcards

1
Q

Run gdb on lab1

A

Gdb lab1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Break at a specific function

A

Break function_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Set a break point at a specific line

A

Break 15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Next statement

A

Steps over function calls. Prints the line of code to be executed next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Print command

A

Will show us the current value of any in-scope variable name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Disp command

A

Allows us to continuously watch the value for the variable value. Automatically displays the value fo a expression after every step in execution. Print just prints the variable/expression once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Continue

A

Means to run all of the code until the next breakpoint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Clear

A

Gets rid of a break point. For example if we want to get rid of the breakpoint at main, we can say clear main

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Delete

A

Gets rid of all breakpoints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Step

A

Allows us to enter a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Set

A

Allows us to change the value of a variable in gdb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Quit

A

Allows us to exit gdb debugger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Run < lab1.input1

A

Runs gdb with redirected input from lab1.input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly