How to run the gdb ?
> gdb executable_name
(then u will see (gdb) )
How to set break points ?
(gdb)b file_name: line_number
or
(gdb)break file_name:line_number
( You can either use break or b)
Executing next line in the program
(gdb)next
or
(gdb)n
How to run the executable?
(gdb)run
How to display value of particular variable?
(gdb) p variable_name
or
(gdb)print variable_name
or
(gdb)display variable_name
or
(gdb)d variable_name
How to Quit Gdb?
(gdb)quit
or
(gdb)q
Reference :
No comments:
Post a Comment