GDB Commands Flashcards

1
Q

Show the values stored in the registers

A

info registers

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

Display contents of a single register

A

display /x $(register)

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

Get assembly instructions

A

disassemble (location)

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

Get GDB to show all registers, including FPU etc.

A

info all-registers

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

Show how memory is laid out

A

info proc mappings

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

Read the source code

A

list (line number)

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

List all of the functions

A

info functions

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

List the source code files

A

info sourcea

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

Get global and static variables

A

info variables

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

List local variables

A

info scope (function)

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

Add a symbol file

A

symbol-file (file)

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

Modify the value at a memory location

A

set {char} (memory location) (value)

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

Add conditional breakpoint

A

Set breakpoint then:

condition (number) (expression)

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