GNU Debugger Flashcards

1
Q

How to use GNU Debugger?

A

gdb <execFilename></execFilename>

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

GDB command to view the list of functions.

A

info functions

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

GDB command to disassemble functions

A

disas <function></function>

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

GDB command to switch to Intel Syntax

A

set disassembly-flavor intel

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

GDB command to run the executable file in gdb

A

r [<command></command>]

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

GDB command to set a breakpoint

A

b*<function><+offset></function>

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

GDB command to inspect registers.

A

info regirster
i r

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

GDB command to inspect specific registers

A

i r <register></register>

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

GDB command to execute next instruction

A

ni

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

GDB command to continue until next breakpoint

A

c

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

GDB command to examine memory location

A

x/<number><format><unit> &<variable></variable></unit></format></number>

number of location is usally for array/heaps

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