GDB Flashcards

1
Q

gdb> list

A

show current location and surrounding lines

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

gdb> info

A

show info on various attributes:
local - local variables
args - arguments to current stack frame

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

gdb> print

A

print variables etc… ex:
print pHead->val // val
print *pHead // address

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

gdb> bt

A

backtrace

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

gdb> up/down

A

move up/down N stackframes to analyze state

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

gdb> break or

A

set a break point on a line or start of a function

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

gdb> help

A

help and then a word to get help with that command

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

gdb> delete

A

delete all break points (or specify one as arg)

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

gdb> n

A

step to next line (skip over, not into)

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

gdb> s

A

step to next command (into, not over)

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