gdb debug core file

1 gdb yourexefile yourcore

2 run

3 bt

back trance

4 f 11

choose frame such f 11

5 info

1 info variables

to list “All global and static variable names” (huge list.

2 info locals

to list “Local variables of current stack frame” (names and values), including static variables in that function.

3 info args

to list “Arguments of the current stack frame” (names and values).

你可能感兴趣的:(linux,运维,服务器,c++)