Run the gdb using the following command:
$ gdb <binary_file_path> <core_file_path>
On the gdb prompt, use the following commands for further debugging:
$ bt (short for backtrace, to get a stack trace and each frame's number from the time of the crash) $ where (an alternative to backtrace) $ frame <stack_frame_number> (replace number with the corresponding number in the stack trace to select a particular stack frame) $ list (to see code around that function) $ info locals (to see the local variables) $ print <name_of_variable> (replacing "name_of_variable" with a variable name, to see its value) $ help (to see additional commands)
No comments:
Post a Comment